Skip to content

Commit 7261bd8

Browse files
committed
Update existing usages
1 parent 2c20c44 commit 7261bd8

File tree

30 files changed

+59
-59
lines changed

30 files changed

+59
-59
lines changed

src/librustc/infer/freshen.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl<'a, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for TypeFreshener<'a, 'gcx, 'tcx> {
101101
ty::ReEmpty |
102102
ty::ReErased => {
103103
// replace all free regions with 'erased
104-
self.tcx().types.re_erased
104+
self.tcx().lifetimes.re_erased
105105
}
106106

107107
ty::ReClosureBound(..) => {

src/librustc/infer/lexical_region_resolve/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ impl<'cx, 'gcx, 'tcx> LexicalResolver<'cx, 'gcx, 'tcx> {
138138
/// empty region. The `expansion` phase will grow this larger.
139139
fn construct_var_data(&self, tcx: TyCtxt<'_, '_, 'tcx>) -> LexicalRegionResolutions<'tcx> {
140140
LexicalRegionResolutions {
141-
error_region: tcx.types.re_static,
142-
values: IndexVec::from_elem_n(VarValue::Value(tcx.types.re_empty), self.num_vars())
141+
error_region: tcx.lifetimes.re_static,
142+
values: IndexVec::from_elem_n(VarValue::Value(tcx.lifetimes.re_empty), self.num_vars())
143143
}
144144
}
145145

@@ -266,7 +266,7 @@ impl<'cx, 'gcx, 'tcx> LexicalResolver<'cx, 'gcx, 'tcx> {
266266
let b_universe = self.var_infos[b_vid].universe;
267267
if let ty::RePlaceholder(p) = lub {
268268
if b_universe.cannot_name(p.universe) {
269-
lub = self.tcx().types.re_static;
269+
lub = self.tcx().lifetimes.re_static;
270270
}
271271
}
272272

@@ -348,7 +348,7 @@ impl<'cx, 'gcx, 'tcx> LexicalResolver<'cx, 'gcx, 'tcx> {
348348

349349
// otherwise, we don't know what the free region is,
350350
// so we must conservatively say the LUB is static:
351-
tcx.types.re_static
351+
tcx.lifetimes.re_static
352352
}
353353

354354
(&ReScope(a_id), &ReScope(b_id)) => {
@@ -371,7 +371,7 @@ impl<'cx, 'gcx, 'tcx> LexicalResolver<'cx, 'gcx, 'tcx> {
371371
(&RePlaceholder(..), _) | (_, &RePlaceholder(..)) => if a == b {
372372
a
373373
} else {
374-
tcx.types.re_static
374+
tcx.lifetimes.re_static
375375
},
376376
}
377377
}
@@ -598,7 +598,7 @@ impl<'cx, 'gcx, 'tcx> LexicalResolver<'cx, 'gcx, 'tcx> {
598598
for lower_bound in &lower_bounds {
599599
let effective_lower_bound = if let ty::RePlaceholder(p) = lower_bound.region {
600600
if node_universe.cannot_name(p.universe) {
601-
self.tcx().types.re_static
601+
self.tcx().lifetimes.re_static
602602
} else {
603603
lower_bound.region
604604
}

src/librustc/infer/opaque_types/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
370370
}
371371
}
372372

373-
let least_region = least_region.unwrap_or(self.tcx.types.re_static);
373+
let least_region = least_region.unwrap_or(self.tcx.lifetimes.re_static);
374374
debug!("constrain_opaque_types: least_region={:?}", least_region);
375375

376376
// Require that the type `concrete_ty` outlives
@@ -608,7 +608,7 @@ impl<'cx, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for ReverseMapper<'cx, 'gcx, 'tcx>
608608
err.emit();
609609
}
610610
}
611-
self.tcx.types.re_empty
611+
self.tcx.lifetimes.re_empty
612612
},
613613
}
614614
}

src/librustc/middle/expr_use_visitor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ impl<'a, 'gcx, 'tcx> ExprUseVisitor<'a, 'gcx, 'tcx> {
435435

436436
hir::ExprKind::Match(ref discr, ref arms, _) => {
437437
let discr_cmt = Rc::new(return_if_err!(self.mc.cat_expr(&discr)));
438-
let r = self.tcx().types.re_empty;
438+
let r = self.tcx().lifetimes.re_empty;
439439
self.borrow_expr(&discr, r, ty::ImmBorrow, MatchDiscriminant);
440440

441441
// treatment of the discriminant is handled while walking the arms.

src/librustc/middle/mem_categorization.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,7 @@ impl<'a, 'gcx, 'tcx> MemCategorizationContext<'a, 'gcx, 'tcx> {
966966
// we can promote to a constant, otherwise equal to enclosing temp
967967
// lifetime.
968968
let re = if promotable {
969-
self.tcx.types.re_static
969+
self.tcx.lifetimes.re_static
970970
} else {
971971
self.temporary_scope(hir_id.local_id)
972972
};

src/librustc/traits/auto_trait.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
787787
(None, Some(t_a)) => {
788788
select.infcx().register_region_obligation_with_cause(
789789
t_a,
790-
select.infcx().tcx.types.re_static,
790+
select.infcx().tcx.lifetimes.re_static,
791791
&dummy_cause,
792792
);
793793
}

src/librustc/traits/fulfill.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ impl<'a, 'b, 'gcx, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'b, 'gcx,
359359
// `for<'a> T: 'a where 'a not in T`, which we can treat as
360360
// `T: 'static`.
361361
Some(t_a) => {
362-
let r_static = self.selcx.tcx().types.re_static;
362+
let r_static = self.selcx.tcx().lifetimes.re_static;
363363
if self.register_region_obligations {
364364
self.selcx.infcx().register_region_obligation_with_cause(
365365
t_a,

src/librustc/traits/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ fn vtable_methods<'a, 'tcx>(
10101010
let substs = trait_ref.map_bound(|trait_ref|
10111011
InternalSubsts::for_item(tcx, def_id, |param, _|
10121012
match param.kind {
1013-
GenericParamDefKind::Lifetime => tcx.types.re_erased.into(),
1013+
GenericParamDefKind::Lifetime => tcx.lifetimes.re_erased.into(),
10141014
GenericParamDefKind::Type { .. } |
10151015
GenericParamDefKind::Const => {
10161016
trait_ref.substs[param.index as usize]

src/librustc/ty/erase_regions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ impl<'a, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for RegionEraserVisitor<'a, 'gcx, 't
6767
// whenever a substitution occurs.
6868
match *r {
6969
ty::ReLateBound(..) => r,
70-
_ => self.tcx.types.re_erased
70+
_ => self.tcx.lifetimes.re_erased
7171
}
7272
}
7373
}

src/librustc/ty/fold.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
624624
pub fn erase_late_bound_regions<T>(self, value: &Binder<T>) -> T
625625
where T : TypeFoldable<'tcx>
626626
{
627-
self.replace_late_bound_regions(value, |_| self.types.re_erased).0
627+
self.replace_late_bound_regions(value, |_| self.lifetimes.re_erased).0
628628
}
629629

630630
/// Rewrite any late-bound regions so that they are anonymous. Region numbers are

0 commit comments

Comments
 (0)