Skip to content

Commit b160dc4

Browse files
committed
docs: rust: remove spurious item in expect list
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: 0486649 ("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>
1 parent 60fc1e6 commit b160dc4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Documentation/rust/coding-guidelines.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,7 @@ may happen in several situations, e.g.:
296296
It also increases the visibility of the remaining ``allow``\ s and reduces the
297297
chance of misapplying one.
298298

299-
Thus prefer ``except`` over ``allow`` unless:
300-
301-
- The lint attribute is intended to be temporary, e.g. while developing.
299+
Thus prefer ``expect`` over ``allow`` unless:
302300

303301
- Conditional compilation triggers the warning in some cases but not others.
304302

0 commit comments

Comments
 (0)