Detect when ?
is being called on a type *after* .unwrap
or .expect
was called on a Result
or Option
#127345
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
D-newcomer-roadblock
Diagnostics: Confusing error or lint; hard to understand for new users.
D-terse
Diagnostics: An error or lint that doesn't give enough information about the problem at hand.
P-low
Low priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following code
currently emits
but it should suggest removing the
.unwrap()
.Inspired by https://x.com/jonasfovea/status/1808961128812183774
The text was updated successfully, but these errors were encountered: