Skip to content

Commit

Permalink
docs: rust: remove spurious item in expect list
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Andreas Hindborg <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
  • Loading branch information
ojeda committed Nov 24, 2024
1 parent 60fc1e6 commit b160dc4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Documentation/rust/coding-guidelines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit b160dc4

Please sign in to comment.