[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ynn95Sv91TzD4HdT@localhost>
Date: Mon, 9 May 2022 22:53:41 -0700
From: Josh Triplett <josh@...htriplett.org>
To: Gaelan Steele <gbs@...ishe.com>
Cc: Jonathan Corbet <corbet@....net>, Miguel Ojeda <ojeda@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
Jarkko Sakkinen <jarkko@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Finn Behrens <me@...enk.de>,
Adam Bratschi-Kaye <ark.email@...il.com>,
Wedson Almeida Filho <wedsonaf@...gle.com>,
Michael Ellerman <mpe@...erman.id.au>,
Sven Van Asbroeck <thesven73@...il.com>,
Wu XiangCheng <bobwxc@...il.cn>, Gary Guo <gary@...yguo.net>,
Boris-Chengbiao Zhou <bobo1239@....de>,
Yuki Okushi <jtitor@...6.org>, Wei Liu <wei.liu@...nel.org>,
Daniel Xu <dxu@...uu.xyz>, Julian Merkle <me@...erkle.de>,
Masahiro Yamada <masahiroy@...nel.org>,
Michal Marek <michal.lkml@...kovi.net>,
Nick Desaulniers <ndesaulniers@...gle.com>,
linux-doc@...r.kernel.org, linux-kbuild@...r.kernel.org
Subject: Re: [PATCH v6 18/23] docs: add Rust documentation
On Mon, May 09, 2022 at 08:14:54PM -0700, Gaelan Steele wrote:
>
>
> > On May 9, 2022, at 3:32 PM, Jonathan Corbet <corbet@....net> wrote:
> >
> >> +It is convenient to instruct editors/IDEs to format while typing,
> >> +when saving or at commit time. However, if for some reason reformatting
> >> +the entire kernel Rust sources is needed at some point, the following can be
> >> +run::
> >> +
> >> + make LLVM=1 rustfmt
> >
> > I will ask whether we want this, though. Why would anybody want to
> > mass-reformat the entire body of kernel code? This seems like something
> > that would generate an endless stream of "helpful" patches and a lot of
> > churn.
>
> That would only happen if the code diverged from rustfmt’s output in the
> first place. Generally, in Rust projects, the source tree is always kept
> formatted with rustfmt - so running `make LLVM=1 rustfmt` would only
> ever touch code that you’d just changed.
Exactly. This is convenient for the same reason doing a project-wide
`cargo fmt` is useful in Rust projects: you can do all your editing,
then format your code before committing.
Powered by blists - more mailing lists