[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y3KtuvAEJoavLQXr@liuwe-devbox-debian-v2>
Date: Mon, 14 Nov 2022 21:06:02 +0000
From: Wei Liu <wei.liu@...nel.org>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc: Wei Liu <wei.liu@...nel.org>, 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 07:22:02PM +0100, Miguel Ojeda wrote:
> 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)?
I think this works too.
>
> Thanks a lot for the reviews, Wei!
>
You're welcome.
Thanks,
Wei.
> Cheers,
> Miguel
Powered by blists - more mailing lists