Skip to content

Commit 69deed9

Browse files
committed
renamed t_nil to t_unit
1 parent 2be5c72 commit 69deed9

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/librustc_driver/test.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ impl<'a, 'gcx, 'tcx> Env<'a, 'gcx, 'tcx> {
308308
)))
309309
}
310310

311-
pub fn t_nil(&self) -> Ty<'tcx> {
311+
pub fn t_unit(&self) -> Ty<'tcx> {
312312
self.infcx.tcx.mk_unit()
313313
}
314314

@@ -491,7 +491,7 @@ fn subst_ty_renumber_bound() {
491491
// t_source = fn(A)
492492
let t_source = {
493493
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())
495495
};
496496

497497
let substs = env.infcx.tcx.intern_substs(&[t_rptr_bound1.into()]);
@@ -500,7 +500,7 @@ fn subst_ty_renumber_bound() {
500500
// t_expected = fn(&'a isize)
501501
let t_expected = {
502502
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())
504504
};
505505

506506
debug!("subst_bound: t_source={:?} substs={:?} t_substituted={:?} t_expected={:?}",
@@ -526,7 +526,7 @@ fn subst_ty_renumber_some_bounds() {
526526
// t_source = (A, fn(A))
527527
let t_source = {
528528
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()))
530530
};
531531

532532
let substs = env.infcx.tcx.intern_substs(&[t_rptr_bound1.into()]);
@@ -537,7 +537,7 @@ fn subst_ty_renumber_some_bounds() {
537537
// but not that the Debruijn index is different in the different cases.
538538
let t_expected = {
539539
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()))
541541
};
542542

543543
debug!("subst_bound: t_source={:?} substs={:?} t_substituted={:?} t_expected={:?}",
@@ -559,7 +559,7 @@ fn escaping() {
559559
// Theta = [A -> &'a foo]
560560
env.create_simple_region_hierarchy();
561561

562-
assert!(!env.t_nil().has_escaping_regions());
562+
assert!(!env.t_unit().has_escaping_regions());
563563

564564
let t_rptr_free1 = env.t_rptr_free(1);
565565
assert!(!t_rptr_free1.has_escaping_regions());
@@ -573,7 +573,7 @@ fn escaping() {
573573
// t_fn = fn(A)
574574
let t_param = env.t_param(0);
575575
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());
577577
assert!(!t_fn.has_escaping_regions());
578578
})
579579
}
@@ -588,7 +588,7 @@ fn subst_region_renumber_region() {
588588
// type t_source<'a> = fn(&'a isize)
589589
let t_source = {
590590
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())
592592
};
593593

594594
let substs = env.infcx.tcx.intern_substs(&[re_bound1.into()]);
@@ -599,7 +599,7 @@ fn subst_region_renumber_region() {
599599
// but not that the Debruijn index is different in the different cases.
600600
let t_expected = {
601601
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())
603603
};
604604

605605
debug!("subst_bound: t_source={:?} substs={:?} t_substituted={:?} t_expected={:?}",

0 commit comments

Comments
 (0)