-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Detect tuple variants used as struct pattern and suggest correct pattern #75354
Conversation
r=me with the cleanup applied. |
0b05411
to
ed3a1f5
Compare
@bors r=petrochenkov |
📌 Commit ed3a1f551ca095c004e62c0082c20bbe7faeacce has been approved by |
This comment has been minimized.
This comment has been minimized.
ed3a1f5
to
016a050
Compare
Two tests failed on CI. |
016a050
to
17ada05
Compare
@bors r+ |
📌 Commit 17ada05 has been approved by |
⌛ Testing commit 17ada05 with merge 0bcc9ec9854c62340ba8ff7e448e0e2da92e8660... |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
💔 Test failed - checks-actions |
☀️ Test successful - checks-actions, checks-azure |
@@ -701,7 +701,16 @@ impl<'a> LateResolutionVisitor<'a, '_, '_> { | |||
if let Some(span) = self.def_span(def_id) { | |||
err.span_label(span, &format!("`{}` defined here", path_str)); | |||
} | |||
err.span_label(span, format!("did you mean `{}( /* fields */ )`?", path_str)); | |||
let fields = | |||
self.r.field_names.get(&def_id).map_or("/* fields */".to_string(), |fields| { |
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.
-.map_or("/* fields */".to_string()
+.map_or_else(|| "/* fields */".to_string()
Fix #61326
r? @petrochenkov