File tree 1 file changed +3
-7
lines changed
compiler/rustc_hir_analysis/src/collect
1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -603,6 +603,8 @@ fn infer_placeholder_type<'a>(
603
603
}
604
604
605
605
err. emit ( ) ;
606
+ // diagnostic stashing loses the information of whether something is a hard error.
607
+ Ty :: new_error_with_message ( tcx, span, "ItemNoType is a hard error" )
606
608
}
607
609
None => {
608
610
let mut diag = bad_placeholder ( tcx, vec ! [ span] , kind) ;
@@ -623,15 +625,9 @@ fn infer_placeholder_type<'a>(
623
625
}
624
626
}
625
627
626
- diag. emit ( ) ;
628
+ Ty :: new_error ( tcx , diag. emit ( ) )
627
629
}
628
630
}
629
-
630
- // Typeck doesn't expect erased regions to be returned from `type_of`.
631
- tcx. fold_regions ( ty, |r, _| match * r {
632
- ty:: ReErased => tcx. lifetimes . re_static ,
633
- _ => r,
634
- } )
635
631
}
636
632
637
633
fn check_feature_inherent_assoc_ty ( tcx : TyCtxt < ' _ > , span : Span ) {
You can’t perform that action at this time.
0 commit comments