]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Documentation: rust: discuss `#[expect(...)]` in the guidelines
authorMiguel Ojeda <ojeda@kernel.org>
Fri, 7 Mar 2025 22:49:24 +0000 (23:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 12:01:42 +0000 (13:01 +0100)
commitcf1cdd56d399544020be49157b3a3f9b62816a41
tree53a7c004d5d03449bbb7c9d970035bd053da2426
parent706d4296b843f35bb24800273f0b084c4382ae74
Documentation: rust: discuss `#[expect(...)]` in the guidelines

commit 04866494e936d041fd196d3a36aecd979e4ef078 upstream.

Discuss `#[expect(...)]` in the Lints sections of the coding guidelines
document, which is an upcoming feature in Rust 1.81.0, and explain that
it is generally to be preferred over `allow` unless there is a reason
not to use it (e.g. conditional compilation being involved).

Tested-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://lore.kernel.org/r/20240904204347.168520-19-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/rust/coding-guidelines.rst