resolve: Avoid "self-confirming" import resolutions in one more case#70236
Merged
bors merged 1 commit intorust-lang:masterfrom Mar 23, 2020
Merged
resolve: Avoid "self-confirming" import resolutions in one more case#70236bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Contributor
|
(rust_highfive has picked a reviewer for you, use r? to override) |
Contributor
|
@bors r+ |
Collaborator
|
📌 Commit e543e31 has been approved by |
Centril
added a commit
to Centril/rust
that referenced
this pull request
Mar 23, 2020
…-morse resolve: Avoid "self-confirming" import resolutions in one more case So the idea behind "blacklisted bindings" is that we must ignore some name definitions during resolution because otherwise they cause infinite cycles. E.g. import ```rust use my_crate; ``` would refer to itself (on 2018 edition) without this blacklisting, because `use my_crate;` is the first name in scope when we are resolving `my_crate` here. In this PR we are doing this blacklisting for the case ```rust use same::same; ``` , namely blacklisting the second `same` when resolving the first `same`. This was previously forgotten. Fixes rust-lang#62767
This was referenced Mar 23, 2020
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 23, 2020
Rollup of 9 pull requests Successful merges: - rust-lang#69251 (#[track_caller] in traits) - rust-lang#69880 (miri engine: turn error sanity checks into assertions) - rust-lang#70207 (Use getentropy(2) on macos) - rust-lang#70227 (Only display definition when suggesting a typo) - rust-lang#70236 (resolve: Avoid "self-confirming" import resolutions in one more case) - rust-lang#70248 (parser: simplify & remove unused field) - rust-lang#70249 (handle ConstKind::Unresolved after monomorphizing) - rust-lang#70269 (remove redundant closures (clippy::redundant_closure)) - rust-lang#70270 (Clean up E0449 explanation) Failed merges: r? @ghost
Closed
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.
So the idea behind "blacklisted bindings" is that we must ignore some name definitions during resolution because otherwise they cause infinite cycles.
E.g. import
would refer to itself (on 2018 edition) without this blacklisting, because
use my_crate;is the first name in scope when we are resolvingmy_cratehere.In this PR we are doing this blacklisting for the case
, namely blacklisting the second
samewhen resolving the firstsame.This was previously forgotten.
Fixes #62767