-
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
Improve diagnostics for constants being used in irrefutable patterns #33406
Conversation
It's pretty confusing and this error triggers in resolve only when "shadowing" a const, so let's make that clearer.
e2fd6d4
to
3ce8dd1
Compare
@@ -623,6 +623,73 @@ let Foo = 12i32; // ok! | |||
The goal here is to avoid a conflict of names. | |||
"##, | |||
|
|||
|
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.
Extra empty line.
Hum... Like you said, it's a bit confusing when you read it. The best explanation I could find for this is maybe too much details? Hard to say. :-/ |
3ce8dd1
to
9f302b6
Compare
updated |
Great job! Thanks a lot @Manishearth! r=me @steveklabnik |
@bors r=GuillaumeGomez |
📌 Commit 9f302b6 has been approved by |
… r=GuillaumeGomez Improve diagnostics for constants being used in irrefutable patterns It's pretty confusing and this error triggers in resolve only when "shadowing" a const, so let's make that clearer. r? @steveklabnik
… r=GuillaumeGomez Improve diagnostics for constants being used in irrefutable patterns It's pretty confusing and this error triggers in resolve only when "shadowing" a const, so let's make that clearer. r? @steveklabnik
It's pretty confusing and this error triggers in resolve only when "shadowing" a const, so let's make that clearer.
r? @steveklabnik