Skip to contentSkip to conversation

docs: rust: remove spurious item in `expect` list

PATCH Applied Miguel Ojeda 4 participants 4 messages Nov 17, 2024 – Nov 24, 2024

Subsystems (2)
lore
Share & tools
lore

Miguel Ojeda

author maintainer
#0 lore raw

PATCH 1/1 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 04866494e936 ("Documentation: rust: discuss `#[expect(...)]` in the guidelines")
---
 Documentation/rust/coding-guidelines.rst | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Documentation/rust/coding-guidelines.rst +1 -3
index f7194f7124b0..a2e326b42410 100644
@@ -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.
 

base-commit: b2603f8ac8217bc59f5c7f248ac248423b9b99cb

Signature · 1 line
2.47.0
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Miguel Ojeda

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")
reviewer Reviewed-by on v1 1/1
#2 lore raw
In reply to Miguel Ojeda
Quoted 9 lines · Miguel Ojeda

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")

---

Best regards,
Andreas Hindborg

Applied
#3 lore raw
In reply to Miguel Ojeda
Quoted 9 lines · Miguel Ojeda

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")

Applied to rust-next -- thanks everyone!

Cheers,
Miguel