-
Notifications
You must be signed in to change notification settings - Fork 13.3k
use suggestions for "enum instead of variant" error #59323
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
r? @varkor (rust_highfive has picked a reviewer for you, use r? to override) |
.join("\n"))); | ||
if !variants.is_empty() { | ||
let msg = if variants.len() == 1 { | ||
"use the enum's variant" |
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.
"use the enum's variant" | |
"try using the enum's variant" |
(For consistency with existing suggestions.)
let msg = if variants.len() == 1 { | ||
"use the enum's variant" | ||
} else { | ||
"use one of the enum's variants" |
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.
"use one of the enum's variants" | |
"try using one of the enum's variants" |
r=me with the minor phrasing change. |
f2d62a8
to
16a8abe
Compare
@varkor Fixed. |
@bors r+ rollup |
📌 Commit 16a8abe has been approved by |
…arkor use suggestions for "enum instead of variant" error
…arkor use suggestions for "enum instead of variant" error
Rollup of 18 pull requests Successful merges: - #59106 (Add peer_addr function to UdpSocket) - #59170 (Add const generics to rustdoc) - #59172 (Update and clean up several parts of CONTRIBUTING.md) - #59190 (consistent naming for Rhs type parameter in libcore/ops) - #59236 (Rename miri component to miri-preview) - #59266 (Do not complain about non-existing fields after parse recovery) - #59273 (some small HIR doc improvements) - #59291 (Make Option<ThreadId> no larger than ThreadId, with NonZeroU64) - #59297 (convert field/method confusion help to suggestions) - #59304 (Move some bench tests back from libtest) - #59309 (Add messages for different verbosity levels. Output copy actions.) - #59321 (Unify E0109, E0110 and E0111) - #59322 (Tweak incorrect escaped char diagnostic) - #59323 (use suggestions for "enum instead of variant" error) - #59327 (Add NAN test to docs) - #59329 (cleanup: Remove compile-fail-fulldeps directory again) - #59347 (Move one test from run-make-fulldeps to ui) - #59360 (Add tracking issue number for `seek_convenience`) Failed merges: r? @ghost
No description provided.