@@ -464,7 +464,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
464
464
self . astconv . ct_infer ( ty, Some ( param) , inf. span ) . into ( )
465
465
} else {
466
466
self . inferred_params . push ( inf. span ) ;
467
- tcx. const_error ( ty) . into ( )
467
+ tcx. const_error_misc ( ty) . into ( )
468
468
}
469
469
}
470
470
_ => unreachable ! ( ) ,
@@ -518,7 +518,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
518
518
. no_bound_vars ( )
519
519
. expect ( "const parameter types cannot be generic" ) ;
520
520
if let Err ( guar) = ty. error_reported ( ) {
521
- return tcx. const_error_with_guaranteed ( ty, guar) . into ( ) ;
521
+ return tcx. const_error ( ty, guar) . into ( ) ;
522
522
}
523
523
if !infer_args && has_default {
524
524
tcx. const_param_default ( param. def_id ) . subst ( tcx, substs. unwrap ( ) ) . into ( )
@@ -527,7 +527,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
527
527
self . astconv . ct_infer ( ty, Some ( param) , self . span ) . into ( )
528
528
} else {
529
529
// We've already errored above about the mismatch.
530
- tcx. const_error ( ty) . into ( )
530
+ tcx. const_error_misc ( ty) . into ( )
531
531
}
532
532
}
533
533
}
@@ -1387,7 +1387,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
1387
1387
term = match def_kind {
1388
1388
hir:: def:: DefKind :: AssocTy => tcx. ty_error ( reported) . into ( ) ,
1389
1389
hir:: def:: DefKind :: AssocConst => tcx
1390
- . const_error_with_guaranteed (
1390
+ . const_error (
1391
1391
tcx. type_of ( assoc_item_def_id)
1392
1392
. subst ( tcx, projection_ty. skip_binder ( ) . substs ) ,
1393
1393
reported,
0 commit comments