forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow for a missing
adt_def
in NamePrivacyVisitor
.
This was caused by 72b172b in rust-lang#121206. That commit removed an early return from `analysis` when there are stashed errors. As a result, it's possible to reach privacy analysis when there are stashed errors, which means more code paths can be reached. One such code path was handled in that commit, where a `span_bug` was changed to a `span_delayed_bug`. This commit handles another such code path uncovered by fuzzing, in much the same way. Fixes rust-lang#121455.
- Loading branch information
1 parent
c5f69bd
commit 21bb1a4
Showing
3 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
fn test(s: &Self::Id) { | ||
//~^ ERROR failed to resolve: `Self` is only available in impls, traits, and type definitions | ||
match &s[0..3] {} | ||
} | ||
|
||
fn main() {} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions | ||
--> $DIR/unreachable-issue-121455.rs:1:13 | ||
| | ||
LL | fn test(s: &Self::Id) { | ||
| ^^^^ `Self` is only available in impls, traits, and type definitions | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0433`. |