summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Ojeda <ojeda@kernel.org>2024-11-17 14:31:27 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-03-13 13:02:18 +0100
commitd9743b4f5c810d09b95bc0a4422842ecae3fe7c1 (patch)
tree4c27da63532e28f19b36986b69d8e0aa8a36de19
parenta499ebab0f234ff20e73b53b5a3939c05e6bda28 (diff)
docs: rust: remove spurious item in `expect` list
commit b160dc46dd9af4001c802cc9c7d68b6ba58d27c4 upstream. This list started as a "when to prefer `expect`" list, but at some point during writing I changed it to a "prefer `expect` unless..." one. However, the first bullet remained, which does not make sense anymore. Thus remove it. In addition, fix nearby typo. Fixes: 04866494e936 ("Documentation: rust: discuss `#[expect(...)]` in the guidelines") Reviewed-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org> Link: https://lore.kernel.org/r/20241117133127.473937-1-ojeda@kernel.org Signed-off-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--Documentation/rust/coding-guidelines.rst4
1 files changed, 1 insertions, 3 deletions
diff --git a/Documentation/rust/coding-guidelines.rst b/Documentation/rust/coding-guidelines.rst
index f7194f7124b0..a2e326b42410 100644
--- a/Documentation/rust/coding-guidelines.rst
+++ b/Documentation/rust/coding-guidelines.rst
@@ -296,9 +296,7 @@ may happen in several situations, e.g.:
It also increases the visibility of the remaining ``allow``\ s and reduces the
chance of misapplying one.
-Thus prefer ``except`` over ``allow`` unless:
-
-- The lint attribute is intended to be temporary, e.g. while developing.
+Thus prefer ``expect`` over ``allow`` unless:
- Conditional compilation triggers the warning in some cases but not others.