@@ -133,7 +133,7 @@ impl<'cx, 'tcx> WritebackCx<'cx, 'tcx> {
133
133
134
134
fn write_ty_to_typeck_results ( & mut self , hir_id : hir:: HirId , ty : Ty < ' tcx > ) {
135
135
debug ! ( "write_ty_to_typeck_results({:?}, {:?})" , hir_id, ty) ;
136
- assert ! ( !ty. needs_infer ( ) && !ty. has_placeholders( ) && !ty. has_free_regions( ) ) ;
136
+ assert ! ( !ty. has_infer ( ) && !ty. has_placeholders( ) && !ty. has_free_regions( ) ) ;
137
137
self . typeck_results . node_types_mut ( ) . insert ( hir_id, ty) ;
138
138
}
139
139
@@ -508,7 +508,7 @@ impl<'cx, 'tcx> WritebackCx<'cx, 'tcx> {
508
508
fcx_typeck_results. user_provided_types ( ) . items ( ) . map ( |( local_id, c_ty) | {
509
509
let hir_id = hir:: HirId { owner : common_hir_owner, local_id } ;
510
510
511
- if cfg ! ( debug_assertions) && c_ty. needs_infer ( ) {
511
+ if cfg ! ( debug_assertions) && c_ty. has_infer ( ) {
512
512
span_bug ! (
513
513
hir_id. to_span( self . fcx. tcx) ,
514
514
"writeback: `{:?}` has inference variables" ,
@@ -527,7 +527,7 @@ impl<'cx, 'tcx> WritebackCx<'cx, 'tcx> {
527
527
528
528
self . typeck_results . user_provided_sigs . extend (
529
529
fcx_typeck_results. user_provided_sigs . items ( ) . map ( |( & def_id, c_sig) | {
530
- if cfg ! ( debug_assertions) && c_sig. needs_infer ( ) {
530
+ if cfg ! ( debug_assertions) && c_sig. has_infer ( ) {
531
531
span_bug ! (
532
532
self . fcx. tcx. def_span( def_id) ,
533
533
"writeback: `{:?}` has inference variables" ,
@@ -618,7 +618,7 @@ impl<'cx, 'tcx> WritebackCx<'cx, 'tcx> {
618
618
if let Some ( substs) = self . fcx . typeck_results . borrow ( ) . node_substs_opt ( hir_id) {
619
619
let substs = self . resolve ( substs, & span) ;
620
620
debug ! ( "write_substs_to_tcx({:?}, {:?})" , hir_id, substs) ;
621
- assert ! ( !substs. needs_infer ( ) && !substs. has_placeholders( ) ) ;
621
+ assert ! ( !substs. has_infer ( ) && !substs. has_placeholders( ) ) ;
622
622
self . typeck_results . node_substs_mut ( ) . insert ( hir_id, substs) ;
623
623
}
624
624
}
@@ -693,7 +693,7 @@ impl<'cx, 'tcx> WritebackCx<'cx, 'tcx> {
693
693
{
694
694
let hir_id = hir:: HirId { owner : common_hir_owner, local_id } ;
695
695
696
- if cfg ! ( debug_assertions) && container. needs_infer ( ) {
696
+ if cfg ! ( debug_assertions) && container. has_infer ( ) {
697
697
span_bug ! (
698
698
hir_id. to_span( self . fcx. tcx) ,
699
699
"writeback: `{:?}` has inference variables" ,
@@ -711,7 +711,7 @@ impl<'cx, 'tcx> WritebackCx<'cx, 'tcx> {
711
711
{
712
712
let mut resolver = Resolver :: new ( self . fcx , span, self . body ) ;
713
713
let x = x. fold_with ( & mut resolver) ;
714
- if cfg ! ( debug_assertions) && x. needs_infer ( ) {
714
+ if cfg ! ( debug_assertions) && x. has_infer ( ) {
715
715
span_bug ! ( span. to_span( self . fcx. tcx) , "writeback: `{:?}` has inference variables" , x) ;
716
716
}
717
717
0 commit comments