Skip to content
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

Merged
merged 2 commits into from
May 8, 2016

Conversation

Manishearth
Copy link
Member

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.
@@ -623,6 +623,73 @@ let Foo = 12i32; // ok!
The goal here is to avoid a conflict of names.
"##,


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra empty line.

@GuillaumeGomez
Copy link
Member

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. :-/

@Manishearth
Copy link
Member Author

updated

@GuillaumeGomez
Copy link
Member

Great job! Thanks a lot @Manishearth!

r=me @steveklabnik

@Manishearth
Copy link
Member Author

@bors r=GuillaumeGomez

@bors
Copy link
Contributor

bors commented May 5, 2016

📌 Commit 9f302b6 has been approved by GuillaumeGomez

Manishearth added a commit to Manishearth/rust that referenced this pull request May 8, 2016
… 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
bors added a commit that referenced this pull request May 8, 2016
Rollup of 8 pull requests

- Successful merges: #33369, #33373, #33404, #33406, #33420, #33424, #33426, #33473
- Failed merges:
Manishearth added a commit to Manishearth/rust that referenced this pull request May 8, 2016
… 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
bors added a commit that referenced this pull request May 8, 2016
Rollup of 8 pull requests

- Successful merges: #33369, #33373, #33404, #33406, #33420, #33424, #33426, #33473
- Failed merges:
@bors bors merged commit 9f302b6 into rust-lang:master May 8, 2016
@Manishearth Manishearth deleted the diag-improve-const-let branch December 2, 2016 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants