@@ -308,7 +308,7 @@ impl<'a, 'gcx, 'tcx> Env<'a, 'gcx, 'tcx> {
308
308
) ) )
309
309
}
310
310
311
- pub fn t_nil ( & self ) -> Ty < ' tcx > {
311
+ pub fn t_unit ( & self ) -> Ty < ' tcx > {
312
312
self . infcx . tcx . mk_unit ( )
313
313
}
314
314
@@ -491,7 +491,7 @@ fn subst_ty_renumber_bound() {
491
491
// t_source = fn(A)
492
492
let t_source = {
493
493
let t_param = env. t_param ( 0 ) ;
494
- env. t_fn ( & [ t_param] , env. t_nil ( ) )
494
+ env. t_fn ( & [ t_param] , env. t_unit ( ) )
495
495
} ;
496
496
497
497
let substs = env. infcx . tcx . intern_substs ( & [ t_rptr_bound1. into ( ) ] ) ;
@@ -500,7 +500,7 @@ fn subst_ty_renumber_bound() {
500
500
// t_expected = fn(&'a isize)
501
501
let t_expected = {
502
502
let t_ptr_bound2 = env. t_rptr_late_bound_with_debruijn ( 1 , d2 ( ) ) ;
503
- env. t_fn ( & [ t_ptr_bound2] , env. t_nil ( ) )
503
+ env. t_fn ( & [ t_ptr_bound2] , env. t_unit ( ) )
504
504
} ;
505
505
506
506
debug ! ( "subst_bound: t_source={:?} substs={:?} t_substituted={:?} t_expected={:?}" ,
@@ -526,7 +526,7 @@ fn subst_ty_renumber_some_bounds() {
526
526
// t_source = (A, fn(A))
527
527
let t_source = {
528
528
let t_param = env. t_param ( 0 ) ;
529
- env. t_pair ( t_param, env. t_fn ( & [ t_param] , env. t_nil ( ) ) )
529
+ env. t_pair ( t_param, env. t_fn ( & [ t_param] , env. t_unit ( ) ) )
530
530
} ;
531
531
532
532
let substs = env. infcx . tcx . intern_substs ( & [ t_rptr_bound1. into ( ) ] ) ;
@@ -537,7 +537,7 @@ fn subst_ty_renumber_some_bounds() {
537
537
// but not that the Debruijn index is different in the different cases.
538
538
let t_expected = {
539
539
let t_rptr_bound2 = env. t_rptr_late_bound_with_debruijn ( 1 , d2 ( ) ) ;
540
- env. t_pair ( t_rptr_bound1, env. t_fn ( & [ t_rptr_bound2] , env. t_nil ( ) ) )
540
+ env. t_pair ( t_rptr_bound1, env. t_fn ( & [ t_rptr_bound2] , env. t_unit ( ) ) )
541
541
} ;
542
542
543
543
debug ! ( "subst_bound: t_source={:?} substs={:?} t_substituted={:?} t_expected={:?}" ,
@@ -559,7 +559,7 @@ fn escaping() {
559
559
// Theta = [A -> &'a foo]
560
560
env. create_simple_region_hierarchy ( ) ;
561
561
562
- assert ! ( !env. t_nil ( ) . has_escaping_regions( ) ) ;
562
+ assert ! ( !env. t_unit ( ) . has_escaping_regions( ) ) ;
563
563
564
564
let t_rptr_free1 = env. t_rptr_free ( 1 ) ;
565
565
assert ! ( !t_rptr_free1. has_escaping_regions( ) ) ;
@@ -573,7 +573,7 @@ fn escaping() {
573
573
// t_fn = fn(A)
574
574
let t_param = env. t_param ( 0 ) ;
575
575
assert ! ( !t_param. has_escaping_regions( ) ) ;
576
- let t_fn = env. t_fn ( & [ t_param] , env. t_nil ( ) ) ;
576
+ let t_fn = env. t_fn ( & [ t_param] , env. t_unit ( ) ) ;
577
577
assert ! ( !t_fn. has_escaping_regions( ) ) ;
578
578
} )
579
579
}
@@ -588,7 +588,7 @@ fn subst_region_renumber_region() {
588
588
// type t_source<'a> = fn(&'a isize)
589
589
let t_source = {
590
590
let re_early = env. re_early_bound ( 0 , "'a" ) ;
591
- env. t_fn ( & [ env. t_rptr ( re_early) ] , env. t_nil ( ) )
591
+ env. t_fn ( & [ env. t_rptr ( re_early) ] , env. t_unit ( ) )
592
592
} ;
593
593
594
594
let substs = env. infcx . tcx . intern_substs ( & [ re_bound1. into ( ) ] ) ;
@@ -599,7 +599,7 @@ fn subst_region_renumber_region() {
599
599
// but not that the Debruijn index is different in the different cases.
600
600
let t_expected = {
601
601
let t_rptr_bound2 = env. t_rptr_late_bound_with_debruijn ( 1 , d2 ( ) ) ;
602
- env. t_fn ( & [ t_rptr_bound2] , env. t_nil ( ) )
602
+ env. t_fn ( & [ t_rptr_bound2] , env. t_unit ( ) )
603
603
} ;
604
604
605
605
debug ! ( "subst_bound: t_source={:?} substs={:?} t_substituted={:?} t_expected={:?}" ,
0 commit comments