Commit 08dfd13
authored
Rollup merge of rust-lang#70236 - petrochenkov:globimpice, r=ecstatic-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#62767File tree
2 files changed
+24
-0
lines changed- src
- librustc_resolve
- test/ui/imports
2 files changed
+24
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
874 | 874 | | |
875 | 875 | | |
876 | 876 | | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
877 | 883 | | |
878 | 884 | | |
879 | 885 | | |
| |||
884 | 890 | | |
885 | 891 | | |
886 | 892 | | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
887 | 896 | | |
888 | 897 | | |
889 | 898 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
0 commit comments