-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #74516 - lcnr:min-specialization-ice, r=matthewjasper
do not try fetching the ancestors of errored trait impls fixes #74483 While building the specialization graph, we use `tcx.all_impls` which discards impls with incorrect self types, we do however call `trait_def.ancestors` with these impls which caused an ICE as they aren't part of the specialization graph.
- Loading branch information
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
7 changes: 7 additions & 0 deletions
7
src/test/ui/specialization/min_specialization/impl-on-nonexisting.rs
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,7 @@ | ||
#![feature(min_specialization)] | ||
|
||
trait Trait {} | ||
impl Trait for NonExistent {} | ||
//~^ ERROR cannot find type `NonExistent` in this scope | ||
|
||
fn main() {} |
9 changes: 9 additions & 0 deletions
9
src/test/ui/specialization/min_specialization/impl-on-nonexisting.stderr
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[E0412]: cannot find type `NonExistent` in this scope | ||
--> $DIR/impl-on-nonexisting.rs:4:16 | ||
| | ||
LL | impl Trait for NonExistent {} | ||
| ^^^^^^^^^^^ not found in this scope | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0412`. |