File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
compiler/rustc_hir_analysis/src/collect Expand file tree Collapse file tree 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>(
603603 }
604604
605605 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" )
606608 }
607609 None => {
608610 let mut diag = bad_placeholder ( tcx, vec ! [ span] , kind) ;
@@ -623,15 +625,9 @@ fn infer_placeholder_type<'a>(
623625 }
624626 }
625627
626- diag. emit ( ) ;
628+ Ty :: new_error ( tcx , diag. emit ( ) )
627629 }
628630 }
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- } )
635631}
636632
637633fn check_feature_inherent_assoc_ty ( tcx : TyCtxt < ' _ > , span : Span ) {
You can’t perform that action at this time.
0 commit comments