[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72ktW2=JCi3YzyrAd=_RioaWGZSyDusMU2f92_aL3tgvUA@mail.gmail.com>
Date: Mon, 14 Nov 2022 19:22:02 +0100
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Wei Liu <wei.liu@...nel.org>
Cc: Miguel Ojeda <ojeda@...nel.org>,
Wedson Almeida Filho <wedsonaf@...il.com>,
Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
patches@...ts.linux.dev
Subject: Re: [PATCH v1 25/28] rust: add `build_error` crate
On Mon, Nov 14, 2022 at 3:30 PM Wei Liu <wei.liu@...nel.org> wrote:
>
> a const function `build_error`
>
> Without this I read it as a "normal non-const function".
Sounds good to me, especially given the sentence that goes after that.
(I think "function" does not imply one or the other in principle. To
me, `const` ones are normal too, in the sense that they can be used as
any other function.)
> I can work out what the code does, but I also happen to know what Rust's
> const means and its behaviour in non-const context. Other kernel
> developers may not. Even so the description is a bit difficult for me to
> parse.
>
> Maybe a few sentences about const and its behaviours can help?
Not sure if we should explain language details in the documentation of
particular functions. But I agree this case is a bit special.
What about linking the Rust reference/book/... (so that those terms
are clickable when rendered)?
Thanks a lot for the reviews, Wei!
Cheers,
Miguel
Powered by blists - more mailing lists