Skip to content

Commit 37799a5

Browse files
committed
rustc: replace TyCtxt<'a, 'gcx, 'tcx> with TyCtxt<'tcx, 'gcx, 'tcx>.
1 parent 3f511ad commit 37799a5

File tree

292 files changed

+1824
-1838
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

292 files changed

+1824
-1838
lines changed

src/librustc/cfg/construct.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::hir::{self, PatKind};
88
use crate::hir::def_id::DefId;
99

1010
struct CFGBuilder<'a, 'tcx: 'a> {
11-
tcx: TyCtxt<'a, 'tcx, 'tcx>,
11+
tcx: TyCtxt<'tcx, 'tcx, 'tcx>,
1212
owner_def_id: DefId,
1313
tables: &'a ty::TypeckTables<'tcx>,
1414
graph: CFGGraph,
@@ -30,7 +30,7 @@ struct LoopScope {
3030
break_index: CFGIndex, // where to go on a `break`
3131
}
3232

33-
pub fn construct<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
33+
pub fn construct<'a, 'tcx>(tcx: TyCtxt<'tcx, 'tcx, 'tcx>,
3434
body: &hir::Body) -> CFG {
3535
let mut graph = graph::Graph::new();
3636
let entry = graph.add_node(CFGNodeData::Entry);

src/librustc/cfg/graphviz.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub type Node<'a> = (cfg::CFGIndex, &'a cfg::CFGNode);
1212
pub type Edge<'a> = &'a cfg::CFGEdge;
1313

1414
pub struct LabelledCFG<'a, 'tcx: 'a> {
15-
pub tcx: TyCtxt<'a, 'tcx, 'tcx>,
15+
pub tcx: TyCtxt<'tcx, 'tcx, 'tcx>,
1616
pub cfg: &'a cfg::CFG,
1717
pub name: String,
1818
/// `labelled_edges` controls whether we emit labels on the edges

src/librustc/cfg/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub type CFGNode = graph::Node<CFGNodeData>;
4949
pub type CFGEdge = graph::Edge<CFGEdgeData>;
5050

5151
impl CFG {
52-
pub fn new<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
52+
pub fn new<'a, 'tcx>(tcx: TyCtxt<'tcx, 'tcx, 'tcx>,
5353
body: &hir::Body) -> CFG {
5454
construct::construct(tcx, body)
5555
}

src/librustc/dep_graph/dep_node.rs

+21-21
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ macro_rules! define_dep_nodes {
204204
impl DepNode {
205205
#[allow(unreachable_code, non_snake_case)]
206206
#[inline(always)]
207-
pub fn new<'a, 'gcx, 'tcx>(tcx: TyCtxt<'a, 'gcx, 'tcx>,
207+
pub fn new<'a, 'gcx, 'tcx>(tcx: TyCtxt<'tcx, 'gcx, 'tcx>,
208208
dep: DepConstructor<'gcx>)
209209
-> DepNode
210210
where 'gcx: 'a + 'tcx,
@@ -442,49 +442,49 @@ rustc_dep_node_append!([define_dep_nodes!][ <'tcx>
442442
]);
443443

444444
pub trait RecoverKey<'tcx>: Sized {
445-
fn recover(tcx: TyCtxt<'_, 'tcx, 'tcx>, dep_node: &DepNode) -> Option<Self>;
445+
fn recover(tcx: TyCtxt<'tcx, 'tcx, 'tcx>, dep_node: &DepNode) -> Option<Self>;
446446
}
447447

448448
impl RecoverKey<'tcx> for CrateNum {
449-
fn recover(tcx: TyCtxt<'_, 'tcx, 'tcx>, dep_node: &DepNode) -> Option<Self> {
449+
fn recover(tcx: TyCtxt<'tcx, 'tcx, 'tcx>, dep_node: &DepNode) -> Option<Self> {
450450
dep_node.extract_def_id(tcx).map(|id| id.krate)
451451
}
452452
}
453453

454454
impl RecoverKey<'tcx> for DefId {
455-
fn recover(tcx: TyCtxt<'_, 'tcx, 'tcx>, dep_node: &DepNode) -> Option<Self> {
455+
fn recover(tcx: TyCtxt<'tcx, 'tcx, 'tcx>, dep_node: &DepNode) -> Option<Self> {
456456
dep_node.extract_def_id(tcx)
457457
}
458458
}
459459

460460
impl RecoverKey<'tcx> for DefIndex {
461-
fn recover(tcx: TyCtxt<'_, 'tcx, 'tcx>, dep_node: &DepNode) -> Option<Self> {
461+
fn recover(tcx: TyCtxt<'tcx, 'tcx, 'tcx>, dep_node: &DepNode) -> Option<Self> {
462462
dep_node.extract_def_id(tcx).map(|id| id.index)
463463
}
464464
}
465465

466-
trait DepNodeParams<'a, 'gcx: 'tcx + 'a, 'tcx: 'a> : fmt::Debug {
466+
trait DepNodeParams<'gcx: 'tcx, 'tcx>: fmt::Debug {
467467
const CAN_RECONSTRUCT_QUERY_KEY: bool;
468468

469469
/// This method turns the parameters of a DepNodeConstructor into an opaque
470470
/// Fingerprint to be used in DepNode.
471471
/// Not all DepNodeParams support being turned into a Fingerprint (they
472472
/// don't need to if the corresponding DepNode is anonymous).
473-
fn to_fingerprint(&self, _: TyCtxt<'a, 'gcx, 'tcx>) -> Fingerprint {
473+
fn to_fingerprint(&self, _: TyCtxt<'tcx, 'gcx, 'tcx>) -> Fingerprint {
474474
panic!("Not implemented. Accidentally called on anonymous node?")
475475
}
476476

477-
fn to_debug_str(&self, _: TyCtxt<'a, 'gcx, 'tcx>) -> String {
477+
fn to_debug_str(&self, _: TyCtxt<'tcx, 'gcx, 'tcx>) -> String {
478478
format!("{:?}", self)
479479
}
480480
}
481481

482-
impl<'a, 'gcx: 'tcx + 'a, 'tcx: 'a, T> DepNodeParams<'a, 'gcx, 'tcx> for T
483-
where T: HashStable<StableHashingContext<'a>> + fmt::Debug
482+
impl<'gcx: 'tcx, 'tcx, T> DepNodeParams<'gcx, 'tcx> for T
483+
where T: HashStable<StableHashingContext<'tcx>> + fmt::Debug
484484
{
485485
default const CAN_RECONSTRUCT_QUERY_KEY: bool = false;
486486

487-
default fn to_fingerprint(&self, tcx: TyCtxt<'a, 'gcx, 'tcx>) -> Fingerprint {
487+
default fn to_fingerprint(&self, tcx: TyCtxt<'tcx, 'gcx, 'tcx>) -> Fingerprint {
488488
let mut hcx = tcx.create_stable_hashing_context();
489489
let mut hasher = StableHasher::new();
490490

@@ -493,36 +493,36 @@ impl<'a, 'gcx: 'tcx + 'a, 'tcx: 'a, T> DepNodeParams<'a, 'gcx, 'tcx> for T
493493
hasher.finish()
494494
}
495495

496-
default fn to_debug_str(&self, _: TyCtxt<'a, 'gcx, 'tcx>) -> String {
496+
default fn to_debug_str(&self, _: TyCtxt<'tcx, 'gcx, 'tcx>) -> String {
497497
format!("{:?}", *self)
498498
}
499499
}
500500

501-
impl<'a, 'gcx: 'tcx + 'a, 'tcx: 'a> DepNodeParams<'a, 'gcx, 'tcx> for DefId {
501+
impl<'gcx: 'tcx, 'tcx> DepNodeParams<'gcx, 'tcx> for DefId {
502502
const CAN_RECONSTRUCT_QUERY_KEY: bool = true;
503503

504504
fn to_fingerprint(&self, tcx: TyCtxt<'_, '_, '_>) -> Fingerprint {
505505
tcx.def_path_hash(*self).0
506506
}
507507

508-
fn to_debug_str(&self, tcx: TyCtxt<'a, 'gcx, 'tcx>) -> String {
508+
fn to_debug_str(&self, tcx: TyCtxt<'tcx, 'gcx, 'tcx>) -> String {
509509
tcx.def_path_str(*self)
510510
}
511511
}
512512

513-
impl<'a, 'gcx: 'tcx + 'a, 'tcx: 'a> DepNodeParams<'a, 'gcx, 'tcx> for DefIndex {
513+
impl<'gcx: 'tcx, 'tcx> DepNodeParams<'gcx, 'tcx> for DefIndex {
514514
const CAN_RECONSTRUCT_QUERY_KEY: bool = true;
515515

516516
fn to_fingerprint(&self, tcx: TyCtxt<'_, '_, '_>) -> Fingerprint {
517517
tcx.hir().definitions().def_path_hash(*self).0
518518
}
519519

520-
fn to_debug_str(&self, tcx: TyCtxt<'a, 'gcx, 'tcx>) -> String {
520+
fn to_debug_str(&self, tcx: TyCtxt<'tcx, 'gcx, 'tcx>) -> String {
521521
tcx.def_path_str(DefId::local(*self))
522522
}
523523
}
524524

525-
impl<'a, 'gcx: 'tcx + 'a, 'tcx: 'a> DepNodeParams<'a, 'gcx, 'tcx> for CrateNum {
525+
impl<'gcx: 'tcx, 'tcx> DepNodeParams<'gcx, 'tcx> for CrateNum {
526526
const CAN_RECONSTRUCT_QUERY_KEY: bool = true;
527527

528528
fn to_fingerprint(&self, tcx: TyCtxt<'_, '_, '_>) -> Fingerprint {
@@ -533,12 +533,12 @@ impl<'a, 'gcx: 'tcx + 'a, 'tcx: 'a> DepNodeParams<'a, 'gcx, 'tcx> for CrateNum {
533533
tcx.def_path_hash(def_id).0
534534
}
535535

536-
fn to_debug_str(&self, tcx: TyCtxt<'a, 'gcx, 'tcx>) -> String {
536+
fn to_debug_str(&self, tcx: TyCtxt<'tcx, 'gcx, 'tcx>) -> String {
537537
tcx.crate_name(*self).as_str().to_string()
538538
}
539539
}
540540

541-
impl<'a, 'gcx: 'tcx + 'a, 'tcx: 'a> DepNodeParams<'a, 'gcx, 'tcx> for (DefId, DefId) {
541+
impl<'gcx: 'tcx, 'tcx> DepNodeParams<'gcx, 'tcx> for (DefId, DefId) {
542542
const CAN_RECONSTRUCT_QUERY_KEY: bool = false;
543543

544544
// We actually would not need to specialize the implementation of this
@@ -553,7 +553,7 @@ impl<'a, 'gcx: 'tcx + 'a, 'tcx: 'a> DepNodeParams<'a, 'gcx, 'tcx> for (DefId, De
553553
def_path_hash_0.0.combine(def_path_hash_1.0)
554554
}
555555

556-
fn to_debug_str(&self, tcx: TyCtxt<'a, 'gcx, 'tcx>) -> String {
556+
fn to_debug_str(&self, tcx: TyCtxt<'tcx, 'gcx, 'tcx>) -> String {
557557
let (def_id_0, def_id_1) = *self;
558558

559559
format!("({}, {})",
@@ -562,7 +562,7 @@ impl<'a, 'gcx: 'tcx + 'a, 'tcx: 'a> DepNodeParams<'a, 'gcx, 'tcx> for (DefId, De
562562
}
563563
}
564564

565-
impl<'a, 'gcx: 'tcx + 'a, 'tcx: 'a> DepNodeParams<'a, 'gcx, 'tcx> for HirId {
565+
impl<'gcx: 'tcx, 'tcx> DepNodeParams<'gcx, 'tcx> for HirId {
566566
const CAN_RECONSTRUCT_QUERY_KEY: bool = false;
567567

568568
// We actually would not need to specialize the implementation of this

src/librustc/dep_graph/graph.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ impl DepGraph {
604604
/// Try to mark a dep-node which existed in the previous compilation session as green.
605605
fn try_mark_previous_green<'tcx>(
606606
&self,
607-
tcx: TyCtxt<'_, 'tcx, 'tcx>,
607+
tcx: TyCtxt<'tcx, 'tcx, 'tcx>,
608608
data: &DepGraphData,
609609
prev_dep_node_index: SerializedDepNodeIndex,
610610
dep_node: &DepNode
@@ -791,7 +791,7 @@ impl DepGraph {
791791
#[inline(never)]
792792
fn emit_diagnostics<'tcx>(
793793
&self,
794-
tcx: TyCtxt<'_, 'tcx, 'tcx>,
794+
tcx: TyCtxt<'tcx, 'tcx, 'tcx>,
795795
data: &DepGraphData,
796796
dep_node_index: DepNodeIndex,
797797
did_allocation: bool,
@@ -842,7 +842,7 @@ impl DepGraph {
842842
//
843843
// This method will only load queries that will end up in the disk cache.
844844
// Other queries will not be executed.
845-
pub fn exec_cache_promotions<'a, 'tcx>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>) {
845+
pub fn exec_cache_promotions<'a, 'tcx>(&self, tcx: TyCtxt<'tcx, 'tcx, 'tcx>) {
846846
let green_nodes: Vec<DepNode> = {
847847
let data = self.data.as_ref().unwrap();
848848
data.colors.values.indices().filter_map(|prev_index| {

src/librustc/dep_graph/safe.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl DepGraphSafe for DefId {
3333

3434
/// The type context itself can be used to access all kinds of tracked
3535
/// state, but those accesses should always generate read events.
36-
impl<'a, 'gcx, 'tcx> DepGraphSafe for TyCtxt<'a, 'gcx, 'tcx> {
36+
impl<'a, 'gcx, 'tcx> DepGraphSafe for TyCtxt<'tcx, 'gcx, 'tcx> {
3737
}
3838

3939
/// Tuples make it easy to build up state.

src/librustc/hir/check_attr.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ impl Target {
8787
}
8888
}
8989

90-
struct CheckAttrVisitor<'a, 'tcx: 'a> {
91-
tcx: TyCtxt<'a, 'tcx, 'tcx>,
90+
struct CheckAttrVisitor<'tcx> {
91+
tcx: TyCtxt<'tcx, 'tcx, 'tcx>,
9292
}
9393

94-
impl<'a, 'tcx> CheckAttrVisitor<'a, 'tcx> {
94+
impl CheckAttrVisitor<'tcx> {
9595
/// Checks any attribute.
9696
fn check_attributes(&self, item: &hir::Item, target: Target) {
9797
if target == Target::Fn || target == Target::Const {
@@ -310,7 +310,7 @@ impl<'a, 'tcx> CheckAttrVisitor<'a, 'tcx> {
310310
}
311311
}
312312

313-
impl<'a, 'tcx> Visitor<'tcx> for CheckAttrVisitor<'a, 'tcx> {
313+
impl Visitor<'tcx> for CheckAttrVisitor<'tcx> {
314314
fn nested_visit_map<'this>(&'this mut self) -> NestedVisitorMap<'this, 'tcx> {
315315
NestedVisitorMap::OnlyBodies(&self.tcx.hir())
316316
}
@@ -347,7 +347,7 @@ fn is_c_like_enum(item: &hir::Item) -> bool {
347347
}
348348
}
349349

350-
fn check_mod_attrs<'tcx>(tcx: TyCtxt<'_, 'tcx, 'tcx>, module_def_id: DefId) {
350+
fn check_mod_attrs<'tcx>(tcx: TyCtxt<'tcx, 'tcx, 'tcx>, module_def_id: DefId) {
351351
tcx.hir().visit_item_likes_in_module(
352352
module_def_id,
353353
&mut CheckAttrVisitor { tcx }.as_deep_visitor()

src/librustc/hir/upvars.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ impl Visitor<'tcx> for LocalCollector {
5555
}
5656

5757
struct CaptureCollector<'a, 'tcx> {
58-
tcx: TyCtxt<'a, 'tcx, 'tcx>,
58+
tcx: TyCtxt<'tcx, 'tcx, 'tcx>,
5959
locals: &'a FxHashSet<HirId>,
6060
upvars: FxIndexMap<HirId, hir::Upvar>,
6161
}

src/librustc/ich/hcx.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ for &'b mut T {
205205
}
206206
}
207207

208-
impl<'a, 'gcx, 'lcx> StableHashingContextProvider<'a> for TyCtxt<'a, 'gcx, 'lcx> {
209-
fn get_stable_hashing_context(&self) -> StableHashingContext<'a> {
208+
impl StableHashingContextProvider<'lcx> for TyCtxt<'lcx, 'gcx, 'lcx> {
209+
fn get_stable_hashing_context(&self) -> StableHashingContext<'lcx> {
210210
(*self).create_stable_hashing_context()
211211
}
212212
}

src/librustc/infer/canonical/canonicalizer.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ impl CanonicalizeRegionMode for CanonicalizeFreeRegionsOtherThanStatic {
277277

278278
struct Canonicalizer<'cx, 'gcx: 'tcx, 'tcx: 'cx> {
279279
infcx: Option<&'cx InferCtxt<'cx, 'gcx, 'tcx>>,
280-
tcx: TyCtxt<'cx, 'gcx, 'tcx>,
280+
tcx: TyCtxt<'tcx, 'gcx, 'tcx>,
281281
variables: SmallVec<[CanonicalVarInfo; 8]>,
282282
query_state: &'cx mut OriginalQueryValues<'tcx>,
283283
// Note that indices is only used once `var_values` is big enough to be
@@ -290,7 +290,7 @@ struct Canonicalizer<'cx, 'gcx: 'tcx, 'tcx: 'cx> {
290290
}
291291

292292
impl<'cx, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for Canonicalizer<'cx, 'gcx, 'tcx> {
293-
fn tcx<'b>(&'b self) -> TyCtxt<'b, 'gcx, 'tcx> {
293+
fn tcx<'b>(&'b self) -> TyCtxt<'tcx, 'gcx, 'tcx> {
294294
self.tcx
295295
}
296296

@@ -501,7 +501,7 @@ impl<'cx, 'gcx, 'tcx> Canonicalizer<'cx, 'gcx, 'tcx> {
501501
fn canonicalize<V>(
502502
value: &V,
503503
infcx: Option<&InferCtxt<'_, 'gcx, 'tcx>>,
504-
tcx: TyCtxt<'_, 'gcx, 'tcx>,
504+
tcx: TyCtxt<'tcx, 'gcx, 'tcx>,
505505
canonicalize_region_mode: &dyn CanonicalizeRegionMode,
506506
query_state: &mut OriginalQueryValues<'tcx>,
507507
) -> Canonicalized<'gcx, V>

src/librustc/infer/canonical/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ impl<'tcx> CanonicalVarValues<'tcx> {
478478
/// `self.var_values == [Type(u32), Lifetime('a), Type(u64)]`
479479
/// we'll return a substitution `subst` with:
480480
/// `subst.var_values == [Type(^0), Lifetime(^1), Type(^2)]`.
481-
pub fn make_identity<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>) -> Self {
481+
pub fn make_identity<'a>(&self, tcx: TyCtxt<'tcx, 'tcx, 'tcx>) -> Self {
482482
use crate::ty::subst::UnpackedKind;
483483

484484
CanonicalVarValues {

src/librustc/infer/canonical/query_response.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use crate::ty::subst::{Kind, UnpackedKind};
2929
use crate::ty::{self, BoundVar, InferConst, Lift, Ty, TyCtxt};
3030
use crate::util::captures::Captures;
3131

32-
impl<'cx, 'gcx, 'tcx> InferCtxtBuilder<'cx, 'gcx, 'tcx> {
32+
impl<'gcx, 'tcx> InferCtxtBuilder<'gcx, 'tcx> {
3333
/// The "main method" for a canonicalized trait query. Given the
3434
/// canonical key `canonical_key`, this method will create a new
3535
/// inference context, instantiate the key, and run your operation
@@ -647,7 +647,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
647647
/// Given the region obligations and constraints scraped from the infcx,
648648
/// creates query region constraints.
649649
pub fn make_query_outlives<'tcx>(
650-
tcx: TyCtxt<'_, '_, 'tcx>,
650+
tcx: TyCtxt<'tcx, '_, 'tcx>,
651651
outlives_obligations: impl Iterator<Item = (Ty<'tcx>, ty::Region<'tcx>)>,
652652
region_constraints: &RegionConstraintData<'tcx>,
653653
) -> Vec<QueryRegionConstraint<'tcx>> {

src/librustc/infer/canonical/substitute.rs

+7-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ use crate::ty::{self, TyCtxt};
1414
impl<'tcx, V> Canonical<'tcx, V> {
1515
/// Instantiate the wrapped value, replacing each canonical value
1616
/// with the value given in `var_values`.
17-
pub fn substitute(&self, tcx: TyCtxt<'_, '_, 'tcx>, var_values: &CanonicalVarValues<'tcx>) -> V
17+
pub fn substitute(
18+
&self,
19+
tcx: TyCtxt<'tcx, '_, 'tcx>,
20+
var_values: &CanonicalVarValues<'tcx>,
21+
) -> V
1822
where
1923
V: TypeFoldable<'tcx>,
2024
{
@@ -29,7 +33,7 @@ impl<'tcx, V> Canonical<'tcx, V> {
2933
/// V, replacing each of the canonical variables.
3034
pub fn substitute_projected<T>(
3135
&self,
32-
tcx: TyCtxt<'_, '_, 'tcx>,
36+
tcx: TyCtxt<'tcx, '_, 'tcx>,
3337
var_values: &CanonicalVarValues<'tcx>,
3438
projection_fn: impl FnOnce(&V) -> &T,
3539
) -> T
@@ -46,7 +50,7 @@ impl<'tcx, V> Canonical<'tcx, V> {
4650
/// must be values for the set of canonical variables that appear in
4751
/// `value`.
4852
pub(super) fn substitute_value<'a, 'tcx, T>(
49-
tcx: TyCtxt<'_, '_, 'tcx>,
53+
tcx: TyCtxt<'tcx, '_, 'tcx>,
5054
var_values: &CanonicalVarValues<'tcx>,
5155
value: &'a T,
5256
) -> T

src/librustc/infer/combine.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ impl<'infcx, 'gcx, 'tcx> InferCtxt<'infcx, 'gcx, 'tcx> {
6363
a: Ty<'tcx>,
6464
b: Ty<'tcx>)
6565
-> RelateResult<'tcx, Ty<'tcx>>
66-
where R: TypeRelation<'infcx, 'gcx, 'tcx>
66+
where R: TypeRelation<'gcx, 'tcx>
6767
{
6868
let a_is_expected = relation.a_is_expected();
6969

@@ -123,7 +123,7 @@ impl<'infcx, 'gcx, 'tcx> InferCtxt<'infcx, 'gcx, 'tcx> {
123123
b: &'tcx ty::Const<'tcx>,
124124
) -> RelateResult<'tcx, &'tcx ty::Const<'tcx>>
125125
where
126-
R: TypeRelation<'infcx, 'gcx, 'tcx>,
126+
R: TypeRelation<'gcx, 'tcx>,
127127
{
128128
let a_is_expected = relation.a_is_expected();
129129

@@ -207,7 +207,7 @@ impl<'infcx, 'gcx, 'tcx> InferCtxt<'infcx, 'gcx, 'tcx> {
207207
}
208208

209209
impl<'infcx, 'gcx, 'tcx> CombineFields<'infcx, 'gcx, 'tcx> {
210-
pub fn tcx(&self) -> TyCtxt<'infcx, 'gcx, 'tcx> {
210+
pub fn tcx(&self) -> TyCtxt<'tcx, 'gcx, 'tcx> {
211211
self.infcx.tcx
212212
}
213213

@@ -413,8 +413,8 @@ struct Generalization<'tcx> {
413413
needs_wf: bool,
414414
}
415415

416-
impl<'cx, 'gcx, 'tcx> TypeRelation<'cx, 'gcx, 'tcx> for Generalizer<'cx, 'gcx, 'tcx> {
417-
fn tcx(&self) -> TyCtxt<'cx, 'gcx, 'tcx> {
416+
impl TypeRelation<'gcx, 'tcx> for Generalizer<'_, 'gcx, 'tcx> {
417+
fn tcx(&self) -> TyCtxt<'tcx, 'gcx, 'tcx> {
418418
self.infcx.tcx
419419
}
420420

0 commit comments

Comments
 (0)