Skip to content

Commit 925e0b6

Browse files
committed
use 'tcx where it is known to be (Step 2)
1 parent 8f37d1f commit 925e0b6

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

compiler/rustc_hir_typeck/src/expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
12201220
fn check_method_call(
12211221
&self,
12221222
expr: &'tcx hir::Expr<'tcx>,
1223-
segment: &hir::PathSegment<'_>,
1223+
segment: &'tcx hir::PathSegment<'tcx>,
12241224
rcvr: &'tcx hir::Expr<'tcx>,
12251225
args: &'tcx [hir::Expr<'tcx>],
12261226
expected: Expectation<'tcx>,

compiler/rustc_hir_typeck/src/method/confirm.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
4949
call_expr: &'tcx hir::Expr<'tcx>,
5050
unadjusted_self_ty: Ty<'tcx>,
5151
pick: &probe::Pick<'tcx>,
52-
segment: &hir::PathSegment<'_>,
52+
segment: &'tcx hir::PathSegment<'tcx>,
5353
) -> ConfirmResult<'tcx> {
5454
debug!(
5555
"confirm(unadjusted_self_ty={:?}, pick={:?}, generic_args={:?})",
@@ -75,7 +75,7 @@ impl<'a, 'tcx> ConfirmContext<'a, 'tcx> {
7575
&mut self,
7676
unadjusted_self_ty: Ty<'tcx>,
7777
pick: &probe::Pick<'tcx>,
78-
segment: &hir::PathSegment<'_>,
78+
segment: &'tcx hir::PathSegment<'tcx>,
7979
) -> ConfirmResult<'tcx> {
8080
// Adjust the self expression the user provided and obtain the adjusted type.
8181
let self_ty = self.adjust_self_ty(unadjusted_self_ty, &pick);
@@ -325,7 +325,7 @@ impl<'a, 'tcx> ConfirmContext<'a, 'tcx> {
325325
fn instantiate_method_substs(
326326
&mut self,
327327
pick: &probe::Pick<'tcx>,
328-
seg: &hir::PathSegment<'_>,
328+
seg: &'tcx hir::PathSegment<'tcx>,
329329
parent_substs: SubstsRef<'tcx>,
330330
) -> SubstsRef<'tcx> {
331331
// Determine the values for the generic parameters of the method.
@@ -349,7 +349,7 @@ impl<'a, 'tcx> ConfirmContext<'a, 'tcx> {
349349
struct MethodSubstsCtxt<'a, 'tcx> {
350350
cfcx: &'a ConfirmContext<'a, 'tcx>,
351351
pick: &'a probe::Pick<'tcx>,
352-
seg: &'a hir::PathSegment<'a>,
352+
seg: &'tcx hir::PathSegment<'tcx>,
353353
}
354354
impl<'a, 'tcx> CreateSubstsForGenericArgsCtxt<'a, 'tcx> for MethodSubstsCtxt<'a, 'tcx> {
355355
fn args_for_def_id(

compiler/rustc_hir_typeck/src/method/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
178178
pub fn lookup_method(
179179
&self,
180180
self_ty: Ty<'tcx>,
181-
segment: &hir::PathSegment<'_>,
181+
segment: &'tcx hir::PathSegment<'tcx>,
182182
span: Span,
183183
call_expr: &'tcx hir::Expr<'tcx>,
184184
self_expr: &'tcx hir::Expr<'tcx>,

0 commit comments

Comments
 (0)