Skip to content

Cleanup code paths for E0005 #27297

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

Merged
merged 2 commits into from
Jul 26, 2015
Merged

Cleanup code paths for E0005 #27297

merged 2 commits into from
Jul 26, 2015

Conversation

mitaa
Copy link
Contributor

@mitaa mitaa commented Jul 26, 2015

This does two things:

  • removes ast::LocalSource, where only one variant was used because for-loop expansion has changed. One reason that this slipped into here is because the code in check_local which checks for LocalSource::LocalFor would report the same error as in check_exhaustive while using the wrong error code (E0005 instead of E0297).
  • silences the warning about already used diagnostic code E0005 (fixes rustc build warning: diagnostic code E0005 already used #27279)

passes make check locally.

mitaa added 2 commits July 26, 2015 08:56
`LocalSource` indicated wether a let binding originated from for-loop desugaring to enable specialized error messages, but for-loop expansion has changed and this is now achieved through `MatchSource::ForLoopDesugar`.
@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jroesch (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@mitaa mitaa changed the title Cleanup e0005 Cleanup code paths for E0005 Jul 26, 2015
@alexcrichton
Copy link
Member

@bors: r+ 19512be

Thanks!

@bors
Copy link
Collaborator

bors commented Jul 26, 2015

⌛ Testing commit 19512be with merge a42e21d...

bors added a commit that referenced this pull request Jul 26, 2015
This does two things:
* removes ast::LocalSource, where only one variant was used because for-loop expansion has changed. One reason that this slipped into here is because the code in `check_local` which checks for `LocalSource::LocalFor` would report the same error as in `check_exhaustive` while using the wrong error code (E0005 instead of E0297).
* silences the warning about already used diagnostic code E0005 (fixes #27279)

passes `make check` locally.
@bors bors merged commit 19512be into rust-lang:master Jul 26, 2015
@jroesch
Copy link
Member

jroesch commented Jul 26, 2015

👍

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.

rustc build warning: diagnostic code E0005 already used
5 participants