@@ -429,7 +429,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
429429 }
430430 if let ( hir:: TyKind :: Infer , false ) = ( & ty. kind , self . astconv . allow_ty_infer ( ) ) {
431431 self . inferred_params . push ( ty. span ) ;
432- tcx. ty_error ( ) . into ( )
432+ tcx. ty_error_misc ( ) . into ( )
433433 } else {
434434 self . astconv . ast_ty_to_ty ( ty) . into ( )
435435 }
@@ -502,14 +502,14 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
502502 _ => false ,
503503 } ) {
504504 // Avoid ICE #86756 when type error recovery goes awry.
505- return tcx. ty_error ( ) . into ( ) ;
505+ return tcx. ty_error_misc ( ) . into ( ) ;
506506 }
507507 tcx. at ( self . span ) . type_of ( param. def_id ) . subst ( tcx, substs) . into ( )
508508 } else if infer_args {
509509 self . astconv . ty_infer ( Some ( param) , self . span ) . into ( )
510510 } else {
511511 // We've already errored above about the mismatch.
512- tcx. ty_error ( ) . into ( )
512+ tcx. ty_error_misc ( ) . into ( )
513513 }
514514 }
515515 GenericParamDefKind :: Const { has_default } => {
@@ -1239,9 +1239,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
12391239 }
12401240 let reported = err. emit ( ) ;
12411241 term = match def_kind {
1242- hir:: def:: DefKind :: AssocTy => {
1243- tcx. ty_error_with_guaranteed ( reported) . into ( )
1244- }
1242+ hir:: def:: DefKind :: AssocTy => tcx. ty_error ( reported) . into ( ) ,
12451243 hir:: def:: DefKind :: AssocConst => tcx
12461244 . const_error_with_guaranteed (
12471245 tcx. type_of ( assoc_item_def_id)
@@ -1397,7 +1395,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
13971395 . map ( |trait_ref| tcx. def_span ( trait_ref) ) ;
13981396 let reported =
13991397 tcx. sess . emit_err ( TraitObjectDeclaredWithNoTraits { span, trait_alias_span } ) ;
1400- return tcx. ty_error_with_guaranteed ( reported) ;
1398+ return tcx. ty_error ( reported) ;
14011399 }
14021400
14031401 // Check that there are no gross object safety violations;
@@ -1414,7 +1412,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
14141412 & object_safety_violations,
14151413 )
14161414 . emit ( ) ;
1417- return tcx. ty_error_with_guaranteed ( reported) ;
1415+ return tcx. ty_error ( reported) ;
14181416 }
14191417 }
14201418
@@ -1523,10 +1521,10 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
15231521 if arg == dummy_self. into ( ) {
15241522 let param = & generics. params [ index] ;
15251523 missing_type_params. push ( param. name ) ;
1526- return tcx. ty_error ( ) . into ( ) ;
1524+ return tcx. ty_error_misc ( ) . into ( ) ;
15271525 } else if arg. walk ( ) . any ( |arg| arg == dummy_self. into ( ) ) {
15281526 references_self = true ;
1529- return tcx. ty_error ( ) . into ( ) ;
1527+ return tcx. ty_error_misc ( ) . into ( ) ;
15301528 }
15311529 arg
15321530 } )
@@ -1588,7 +1586,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
15881586 . iter ( )
15891587 . map ( |arg| {
15901588 if arg. walk ( ) . any ( |arg| arg == dummy_self. into ( ) ) {
1591- return tcx. ty_error_with_guaranteed ( guar) . into ( ) ;
1589+ return tcx. ty_error ( guar) . into ( ) ;
15921590 }
15931591 arg
15941592 } )
@@ -2474,7 +2472,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
24742472 & [ path_str] ,
24752473 item_segment. ident . name ,
24762474 ) ;
2477- return tcx. ty_error_with_guaranteed ( reported)
2475+ return tcx. ty_error ( reported)
24782476 } ;
24792477
24802478 debug ! ( "qpath_to_ty: self_type={:?}" , self_ty) ;
@@ -2821,7 +2819,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
28212819 let index = generics. param_def_id_to_index [ & def_id. to_def_id ( ) ] ;
28222820 tcx. mk_ty_param ( index, tcx. hir ( ) . ty_param_name ( def_id) )
28232821 }
2824- Some ( rbv:: ResolvedArg :: Error ( guar) ) => tcx. ty_error_with_guaranteed ( guar) ,
2822+ Some ( rbv:: ResolvedArg :: Error ( guar) ) => tcx. ty_error ( guar) ,
28252823 arg => bug ! ( "unexpected bound var resolution for {hir_id:?}: {arg:?}" ) ,
28262824 }
28272825 }
@@ -2933,7 +2931,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
29332931 {
29342932 err. span_note ( impl_. self_ty . span , "not a concrete type" ) ;
29352933 }
2936- tcx. ty_error_with_guaranteed ( err. emit ( ) )
2934+ tcx. ty_error ( err. emit ( ) )
29372935 } else {
29382936 ty
29392937 }
@@ -2986,7 +2984,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
29862984 . sess
29872985 . delay_span_bug ( path. span , "path with `Res::Err` but no error emitted" ) ;
29882986 self . set_tainted_by_errors ( e) ;
2989- self . tcx ( ) . ty_error_with_guaranteed ( e)
2987+ self . tcx ( ) . ty_error ( e)
29902988 }
29912989 _ => span_bug ! ( span, "unexpected resolution: {:?}" , path. res) ,
29922990 }
@@ -3065,7 +3063,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
30653063 let ty = self . ast_ty_to_ty_inner ( qself, false , true ) ;
30663064 self . associated_path_to_ty ( ast_ty. hir_id , ast_ty. span , ty, qself, segment, false )
30673065 . map ( |( ty, _, _) | ty)
3068- . unwrap_or_else ( |guar| tcx. ty_error_with_guaranteed ( guar) )
3066+ . unwrap_or_else ( |guar| tcx. ty_error ( guar) )
30693067 }
30703068 & hir:: TyKind :: Path ( hir:: QPath :: LangItem ( lang_item, span, _) ) => {
30713069 let def_id = tcx. require_lang_item ( lang_item, Some ( span) ) ;
@@ -3113,7 +3111,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
31133111 // handled specially and will not descend into this routine.
31143112 self . ty_infer ( None , ast_ty. span )
31153113 }
3116- hir:: TyKind :: Err => tcx. ty_error ( ) ,
3114+ hir:: TyKind :: Err => tcx. ty_error_misc ( ) ,
31173115 } ;
31183116
31193117 self . record_ty ( ast_ty. hir_id , result_ty, ast_ty. span ) ;
0 commit comments