Messages in this thread | | | From | Miguel Ojeda <> | Date | Mon, 14 Nov 2022 19:22:02 +0100 | Subject | Re: [PATCH v1 25/28] rust: add `build_error` crate |
| |
On Mon, Nov 14, 2022 at 3:30 PM Wei Liu <wei.liu@kernel.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
| |