-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
suggestion for unit enum variant when matched with a patern #84818
Conversation
r? @jackh726 (rust-highfive has picked a reviewer for you, use r? to override) |
LGTM. Thanks! @bors r+ rollup |
📌 Commit 5cc21d9 has been approved by |
Rollup of 6 pull requests Successful merges: - rust-lang#84072 (Allow setting `target_family` to multiple values, and implement `target_family="wasm"`) - rust-lang#84744 (Add ErrorKind::OutOfMemory) - rust-lang#84784 (Add help message to suggest const for unused type param) - rust-lang#84811 (RustDoc: Fix bounds linking trait.Foo instead of traitalias.Foo) - rust-lang#84818 (suggestion for unit enum variant when matched with a patern) - rust-lang#84832 (Do not print visibility in external traits) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
span, | ||
&format!("use this syntax instead"), | ||
format!("{path_str}"), | ||
Applicability::MaybeIncorrect, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be machine applicable? In what cases it will be incorrect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, there are two different suggestions that get emitted, so there could be some ambiguity. (I guess the "help: a tuple struct with a similar name exists" suggestion might just never be what the user wants, but that decision would have to be made in another PR)
resolve #84700
add suggestion for code like