Resolve: fix scoping bug (fixes #31845) and improve unused import detection#31857
Merged
bors merged 2 commits intorust-lang:masterfrom Feb 26, 2016
Merged
Resolve: fix scoping bug (fixes #31845) and improve unused import detection#31857bors merged 2 commits intorust-lang:masterfrom
bors merged 2 commits intorust-lang:masterfrom
Conversation
Contributor
Author
f94a755 to
5d5bfb3
Compare
5d5bfb3 to
2942cf7
Compare
Contributor
|
@jseyfried to be clear, by "breaking change" you mean "bug fix", right? Seems clear this was never intended to work. |
Contributor
|
@bors r+ |
Collaborator
|
📌 Commit 2942cf7 has been approved by |
Contributor
Author
|
Yeah, this is definitely a bug fix. I was using "[breaking-change]" in the most literal way, i.e. a change that can break code that used to compile, correctly or not. Is this not the intended meaning? |
Collaborator
|
⌛ Testing commit 2942cf7 with merge 9c6a008... |
bors
added a commit
that referenced
this pull request
Feb 26, 2016
This fixes a bug (#31845) introduced in #31105 in which lexical scopes contain items from all anonymous module ancestors, even if the path to the anonymous module includes a normal module: ```rust fn f() { fn g() {} mod foo { fn h() { g(); // This erroneously resolves on nightly } } } ``` This is a [breaking-change] on nightly but not on stable or beta. r? @nikomatsakis
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes a bug (#31845) introduced in #31105 in which lexical scopes contain items from all anonymous module ancestors, even if the path to the anonymous module includes a normal module:
This is a [breaking-change] on nightly but not on stable or beta.
r? @nikomatsakis