File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed
test/ui/specialization/min_specialization Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 11use crate :: ich:: { self , StableHashingContext } ;
22use crate :: ty:: fast_reject:: SimplifiedType ;
3+ use crate :: ty:: fold:: TypeFoldable ;
34use crate :: ty:: { self , TyCtxt } ;
45use rustc_data_structures:: fx:: FxHashMap ;
56use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
@@ -226,7 +227,8 @@ pub fn ancestors(
226227 start_from_impl : DefId ,
227228) -> Result < Ancestors < ' tcx > , ErrorReported > {
228229 let specialization_graph = tcx. specialization_graph_of ( trait_def_id) ;
229- if specialization_graph. has_errored {
230+
231+ if specialization_graph. has_errored || tcx. type_of ( start_from_impl) . references_error ( ) {
230232 Err ( ErrorReported )
231233 } else {
232234 Ok ( Ancestors {
Original file line number Diff line number Diff line change 1+ #![ feature( min_specialization) ]
2+
3+ trait Trait { }
4+ impl Trait for NonExistent { }
5+ //~^ ERROR cannot find type `NonExistent` in this scope
6+
7+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ error[E0412]: cannot find type `NonExistent` in this scope
2+ --> $DIR/impl-on-nonexisting.rs:4:16
3+ |
4+ LL | impl Trait for NonExistent {}
5+ | ^^^^^^^^^^^ not found in this scope
6+
7+ error: aborting due to previous error
8+
9+ For more information about this error, try `rustc --explain E0412`.
You can’t perform that action at this time.
0 commit comments