Skip to content

Commit ae21dd0

Browse files
Remove in_band_lifetimes
1 parent 1796de7 commit ae21dd0

26 files changed

+64
-65
lines changed

Diff for: compiler/rustc_typeck/src/astconv/errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
9292
&self,
9393
span: Span,
9494
trait_def_id: DefId,
95-
trait_segment: &'a hir::PathSegment<'a>,
95+
trait_segment: &'_ hir::PathSegment<'_>,
9696
) {
9797
let trait_def = self.tcx().trait_def(trait_def_id);
9898

Diff for: compiler/rustc_typeck/src/check/_match.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
557557
}
558558
}
559559

560-
fn arms_contain_ref_bindings(arms: &'tcx [hir::Arm<'tcx>]) -> Option<hir::Mutability> {
560+
fn arms_contain_ref_bindings<'tcx>(arms: &'tcx [hir::Arm<'tcx>]) -> Option<hir::Mutability> {
561561
arms.iter().filter_map(|a| a.pat.contains_explicit_ref_binding()).max_by_key(|m| match *m {
562562
hir::Mutability::Mut => 1,
563563
hir::Mutability::Not => 0,

Diff for: compiler/rustc_typeck/src/check/check.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ pub(super) fn check_opaque<'tcx>(
453453
/// Checks that an opaque type does not use `Self` or `T::Foo` projections that would result
454454
/// in "inheriting lifetimes".
455455
#[instrument(level = "debug", skip(tcx, span))]
456-
pub(super) fn check_opaque_for_inheriting_lifetimes(
456+
pub(super) fn check_opaque_for_inheriting_lifetimes<'tcx>(
457457
tcx: TyCtxt<'tcx>,
458458
def_id: LocalDefId,
459459
span: Span,
@@ -517,7 +517,7 @@ pub(super) fn check_opaque_for_inheriting_lifetimes(
517517
}
518518
}
519519

520-
impl Visitor<'tcx> for ProhibitOpaqueVisitor<'tcx> {
520+
impl<'tcx> Visitor<'tcx> for ProhibitOpaqueVisitor<'tcx> {
521521
type Map = rustc_middle::hir::map::Map<'tcx>;
522522

523523
fn nested_visit_map(&mut self) -> hir::intravisit::NestedVisitorMap<Self::Map> {
@@ -1512,7 +1512,7 @@ pub(super) use wfcheck::check_trait_item as check_trait_item_well_formed;
15121512

15131513
pub(super) use wfcheck::check_impl_item as check_impl_item_well_formed;
15141514

1515-
fn async_opaque_type_cycle_error(tcx: TyCtxt<'tcx>, span: Span) {
1515+
fn async_opaque_type_cycle_error(tcx: TyCtxt<'_>, span: Span) {
15161516
struct_span_err!(tcx.sess, span, E0733, "recursion in an `async fn` requires boxing")
15171517
.span_label(span, "recursive `async fn`")
15181518
.note("a recursive `async fn` must be rewritten to return a boxed `dyn Future`")
@@ -1530,7 +1530,7 @@ fn async_opaque_type_cycle_error(tcx: TyCtxt<'tcx>, span: Span) {
15301530
///
15311531
/// If all the return expressions evaluate to `!`, then we explain that the error will go away
15321532
/// after changing it. This can happen when a user uses `panic!()` or similar as a placeholder.
1533-
fn opaque_type_cycle_error(tcx: TyCtxt<'tcx>, def_id: LocalDefId, span: Span) {
1533+
fn opaque_type_cycle_error(tcx: TyCtxt<'_>, def_id: LocalDefId, span: Span) {
15341534
let mut err = struct_span_err!(tcx.sess, span, E0720, "cannot resolve opaque type");
15351535

15361536
let mut label = false;

Diff for: compiler/rustc_typeck/src/check/coercion.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ fn identity(_: Ty<'_>) -> Vec<Adjustment<'_>> {
102102
vec![]
103103
}
104104

105-
fn simple(kind: Adjust<'tcx>) -> impl FnOnce(Ty<'tcx>) -> Vec<Adjustment<'tcx>> {
105+
fn simple<'tcx>(kind: Adjust<'tcx>) -> impl FnOnce(Ty<'tcx>) -> Vec<Adjustment<'tcx>> {
106106
move |target| vec![Adjustment { kind, target }]
107107
}
108108

@@ -1694,7 +1694,7 @@ impl<'tcx, 'exprs, E: AsCoercionSite> CoerceMany<'tcx, 'exprs, E> {
16941694
err.help("you could instead create a new `enum` with a variant for each returned type");
16951695
}
16961696

1697-
fn is_return_ty_unsized(&self, fcx: &FnCtxt<'a, 'tcx>, blk_id: hir::HirId) -> bool {
1697+
fn is_return_ty_unsized<'a>(&self, fcx: &FnCtxt<'a, 'tcx>, blk_id: hir::HirId) -> bool {
16981698
if let Some((fn_decl, _)) = fcx.get_fn_decl(blk_id) {
16991699
if let hir::FnRetTy::Return(ty) = fn_decl.output {
17001700
let ty = <dyn AstConv<'_>>::ast_ty_to_ty(fcx, ty);

Diff for: compiler/rustc_typeck/src/check/dropck.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ impl<'tcx> SimpleEqRelation<'tcx> {
302302
}
303303
}
304304

305-
impl TypeRelation<'tcx> for SimpleEqRelation<'tcx> {
305+
impl<'tcx> TypeRelation<'tcx> for SimpleEqRelation<'tcx> {
306306
fn tcx(&self) -> TyCtxt<'tcx> {
307307
self.tcx
308308
}

Diff for: compiler/rustc_typeck/src/check/inherited.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pub struct InheritedBuilder<'tcx> {
7676
def_id: LocalDefId,
7777
}
7878

79-
impl Inherited<'_, 'tcx> {
79+
impl<'tcx> Inherited<'_, 'tcx> {
8080
pub fn build(tcx: TyCtxt<'tcx>, def_id: LocalDefId) -> InheritedBuilder<'tcx> {
8181
let hir_owner = tcx.hir().local_def_id_to_hir_id(def_id).owner;
8282

@@ -97,7 +97,7 @@ impl<'tcx> InheritedBuilder<'tcx> {
9797
}
9898
}
9999

100-
impl Inherited<'a, 'tcx> {
100+
impl<'a, 'tcx> Inherited<'a, 'tcx> {
101101
pub(super) fn new(infcx: InferCtxt<'a, 'tcx>, def_id: LocalDefId) -> Self {
102102
let tcx = infcx.tcx;
103103
let item_id = tcx.hir().local_def_id_to_hir_id(def_id);

Diff for: compiler/rustc_typeck/src/check/method/suggest.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1968,7 +1968,7 @@ fn find_use_placement<'tcx>(tcx: TyCtxt<'tcx>, target_module: LocalDefId) -> (Op
19681968
(span, found_use)
19691969
}
19701970

1971-
fn print_disambiguation_help(
1971+
fn print_disambiguation_help<'tcx>(
19721972
item_name: Ident,
19731973
args: Option<&'tcx [hir::Expr<'tcx>]>,
19741974
err: &mut DiagnosticBuilder<'_>,

Diff for: compiler/rustc_typeck/src/check/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ struct GeneratorTypes<'tcx> {
508508

509509
/// Given a `DefId` for an opaque type in return position, find its parent item's return
510510
/// expressions.
511-
fn get_owner_return_paths(
511+
fn get_owner_return_paths<'tcx>(
512512
tcx: TyCtxt<'tcx>,
513513
def_id: LocalDefId,
514514
) -> Option<(hir::HirId, ReturnsVisitor<'tcx>)> {
@@ -906,7 +906,7 @@ struct CheckItemTypesVisitor<'tcx> {
906906
tcx: TyCtxt<'tcx>,
907907
}
908908

909-
impl ItemLikeVisitor<'tcx> for CheckItemTypesVisitor<'tcx> {
909+
impl<'tcx> ItemLikeVisitor<'tcx> for CheckItemTypesVisitor<'tcx> {
910910
fn visit_item(&mut self, i: &'tcx hir::Item<'tcx>) {
911911
check_item_type(self.tcx, i);
912912
}

Diff for: compiler/rustc_typeck/src/check/op.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ enum Op {
893893
}
894894

895895
/// Dereferences a single level of immutable referencing.
896-
fn deref_ty_if_possible(ty: Ty<'tcx>) -> Ty<'tcx> {
896+
fn deref_ty_if_possible<'tcx>(ty: Ty<'tcx>) -> Ty<'tcx> {
897897
match ty.kind() {
898898
ty::Ref(_, ty, hir::Mutability::Not) => ty,
899899
_ => ty,
@@ -1007,7 +1007,7 @@ impl<'tcx> TypeVisitor<'tcx> for TypeParamVisitor<'tcx> {
10071007

10081008
struct TypeParamEraser<'a, 'tcx>(&'a FnCtxt<'a, 'tcx>, Span);
10091009

1010-
impl TypeFolder<'tcx> for TypeParamEraser<'_, 'tcx> {
1010+
impl<'tcx> TypeFolder<'tcx> for TypeParamEraser<'_, 'tcx> {
10111011
fn tcx(&self) -> TyCtxt<'tcx> {
10121012
self.0.tcx
10131013
}

Diff for: compiler/rustc_typeck/src/check/pat.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
740740
}
741741
}
742742

743-
fn check_pat_path(
743+
fn check_pat_path<'b>(
744744
&self,
745745
pat: &Pat<'_>,
746746
path_resolution: (Res, Option<Ty<'tcx>>, &'b [hir::PathSegment<'b>]),
@@ -816,7 +816,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
816816
false
817817
}
818818

819-
fn emit_bad_pat_path(
819+
fn emit_bad_pat_path<'b>(
820820
&self,
821821
mut e: DiagnosticBuilder<'_>,
822822
pat_span: Span,

Diff for: compiler/rustc_typeck/src/check/regionck.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ macro_rules! ignore_err {
106106
pub(crate) trait OutlivesEnvironmentExt<'tcx> {
107107
fn add_implied_bounds(
108108
&mut self,
109-
infcx: &InferCtxt<'a, 'tcx>,
109+
infcx: &InferCtxt<'_, 'tcx>,
110110
fn_sig_tys: FxHashSet<Ty<'tcx>>,
111111
body_id: hir::HirId,
112112
span: Span,
@@ -130,7 +130,7 @@ impl<'tcx> OutlivesEnvironmentExt<'tcx> for OutlivesEnvironment<'tcx> {
130130
/// add those assumptions into the outlives-environment.
131131
///
132132
/// Tests: `src/test/ui/regions/regions-free-region-ordering-*.rs`
133-
fn add_implied_bounds(
133+
fn add_implied_bounds<'a>(
134134
&mut self,
135135
infcx: &InferCtxt<'a, 'tcx>,
136136
fn_sig_tys: FxHashSet<Ty<'tcx>>,

Diff for: compiler/rustc_typeck/src/check/upvar.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -1672,7 +1672,7 @@ fn restrict_repr_packed_field_ref_capture<'tcx>(
16721672
}
16731673

16741674
/// Returns a Ty that applies the specified capture kind on the provided capture Ty
1675-
fn apply_capture_kind_on_capture_ty(
1675+
fn apply_capture_kind_on_capture_ty<'tcx>(
16761676
tcx: TyCtxt<'tcx>,
16771677
ty: Ty<'tcx>,
16781678
capture_kind: UpvarCapture<'tcx>,
@@ -1685,7 +1685,7 @@ fn apply_capture_kind_on_capture_ty(
16851685
}
16861686

16871687
/// Returns the Span of where the value with the provided HirId would be dropped
1688-
fn drop_location_span(tcx: TyCtxt<'tcx>, hir_id: &hir::HirId) -> Span {
1688+
fn drop_location_span<'tcx>(tcx: TyCtxt<'tcx>, hir_id: &hir::HirId) -> Span {
16891689
let owner_id = tcx.hir().get_enclosing_scope(*hir_id).unwrap();
16901690

16911691
let owner_node = tcx.hir().get(owner_id);
@@ -1999,7 +1999,7 @@ fn restrict_precision_for_drop_types<'a, 'tcx>(
19991999
/// - No projections are applied to raw pointers, since these require unsafe blocks. We capture
20002000
/// them completely.
20012001
/// - No projections are applied on top of Union ADTs, since these require unsafe blocks.
2002-
fn restrict_precision_for_unsafe(
2002+
fn restrict_precision_for_unsafe<'tcx>(
20032003
mut place: Place<'tcx>,
20042004
mut curr_mode: ty::UpvarCapture<'tcx>,
20052005
) -> (Place<'tcx>, ty::UpvarCapture<'tcx>) {
@@ -2097,7 +2097,7 @@ fn adjust_for_non_move_closure<'tcx>(
20972097
(place, kind)
20982098
}
20992099

2100-
fn construct_place_string(tcx: TyCtxt<'_>, place: &Place<'tcx>) -> String {
2100+
fn construct_place_string<'tcx>(tcx: TyCtxt<'_>, place: &Place<'tcx>) -> String {
21012101
let variable_name = match place.base {
21022102
PlaceBase::Upvar(upvar_id) => var_name(tcx, upvar_id.var_path.hir_id).to_string(),
21032103
_ => bug!("Capture_information should only contain upvars"),
@@ -2120,7 +2120,7 @@ fn construct_place_string(tcx: TyCtxt<'_>, place: &Place<'tcx>) -> String {
21202120
format!("{}[{}]", variable_name, projections_str)
21212121
}
21222122

2123-
fn construct_capture_kind_reason_string(
2123+
fn construct_capture_kind_reason_string<'tcx>(
21242124
tcx: TyCtxt<'_>,
21252125
place: &Place<'tcx>,
21262126
capture_info: &ty::CaptureInfo<'tcx>,
@@ -2135,13 +2135,13 @@ fn construct_capture_kind_reason_string(
21352135
format!("{} captured as {} here", place_str, capture_kind_str)
21362136
}
21372137

2138-
fn construct_path_string(tcx: TyCtxt<'_>, place: &Place<'tcx>) -> String {
2138+
fn construct_path_string<'tcx>(tcx: TyCtxt<'_>, place: &Place<'tcx>) -> String {
21392139
let place_str = construct_place_string(tcx, place);
21402140

21412141
format!("{} used here", place_str)
21422142
}
21432143

2144-
fn construct_capture_info_string(
2144+
fn construct_capture_info_string<'tcx>(
21452145
tcx: TyCtxt<'_>,
21462146
place: &Place<'tcx>,
21472147
capture_info: &ty::CaptureInfo<'tcx>,
@@ -2233,7 +2233,7 @@ fn migration_suggestion_for_2229(
22332233
/// would've already handled `E1`, and have an existing capture_information for it.
22342234
/// Calling `determine_capture_info(existing_info_e1, current_info_e2)` will return
22352235
/// `existing_info_e1` in this case, allowing us to point to `E1` in case of diagnostics.
2236-
fn determine_capture_info(
2236+
fn determine_capture_info<'tcx>(
22372237
capture_info_a: ty::CaptureInfo<'tcx>,
22382238
capture_info_b: ty::CaptureInfo<'tcx>,
22392239
) -> ty::CaptureInfo<'tcx> {
@@ -2292,7 +2292,7 @@ fn determine_capture_info(
22922292
///
22932293
/// Note: Capture kind changes from `MutBorrow` to `UniqueImmBorrow` if the truncated part of the `place`
22942294
/// contained `Deref` of `&mut`.
2295-
fn truncate_place_to_len_and_update_capture_kind(
2295+
fn truncate_place_to_len_and_update_capture_kind<'tcx>(
22962296
place: &mut Place<'tcx>,
22972297
curr_mode: &mut ty::UpvarCapture<'tcx>,
22982298
len: usize,
@@ -2330,7 +2330,7 @@ fn truncate_place_to_len_and_update_capture_kind(
23302330
/// `PlaceAncestryRelation::Ancestor` implies Place A is ancestor of Place B
23312331
/// `PlaceAncestryRelation::Descendant` implies Place A is descendant of Place B
23322332
/// `PlaceAncestryRelation::Divergent` implies neither of them is the ancestor of the other.
2333-
fn determine_place_ancestry_relation(
2333+
fn determine_place_ancestry_relation<'tcx>(
23342334
place_a: &Place<'tcx>,
23352335
place_b: &Place<'tcx>,
23362336
) -> PlaceAncestryRelation {

Diff for: compiler/rustc_typeck/src/check/wfcheck.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -1450,7 +1450,7 @@ fn check_method_receiver<'fcx, 'tcx>(
14501450
}
14511451
}
14521452

1453-
fn e0307(fcx: &FnCtxt<'fcx, 'tcx>, span: Span, receiver_ty: Ty<'_>) {
1453+
fn e0307<'fcx, 'tcx> (fcx: &FnCtxt<'fcx, 'tcx>, span: Span, receiver_ty: Ty<'_>) {
14541454
struct_span_err!(
14551455
fcx.tcx.sess.diagnostic(),
14561456
span,
@@ -1553,7 +1553,7 @@ fn receiver_is_valid<'fcx, 'tcx>(
15531553
true
15541554
}
15551555

1556-
fn receiver_is_implemented(
1556+
fn receiver_is_implemented<'tcx>(
15571557
fcx: &FnCtxt<'_, 'tcx>,
15581558
receiver_trait_def_id: DefId,
15591559
cause: ObligationCause<'tcx>,
@@ -1696,13 +1696,13 @@ pub struct CheckTypeWellFormedVisitor<'tcx> {
16961696
tcx: TyCtxt<'tcx>,
16971697
}
16981698

1699-
impl CheckTypeWellFormedVisitor<'tcx> {
1700-
pub fn new(tcx: TyCtxt<'tcx>) -> CheckTypeWellFormedVisitor<'tcx> {
1699+
impl CheckTypeWellFormedVisitor<'_> {
1700+
pub fn new(tcx: TyCtxt<'_>) -> CheckTypeWellFormedVisitor<'_> {
17011701
CheckTypeWellFormedVisitor { tcx }
17021702
}
17031703
}
17041704

1705-
impl ParItemLikeVisitor<'tcx> for CheckTypeWellFormedVisitor<'tcx> {
1705+
impl<'tcx> ParItemLikeVisitor<'tcx> for CheckTypeWellFormedVisitor<'tcx> {
17061706
fn visit_item(&self, i: &'tcx hir::Item<'tcx>) {
17071707
Visitor::visit_item(&mut self.clone(), i);
17081708
}
@@ -1720,7 +1720,7 @@ impl ParItemLikeVisitor<'tcx> for CheckTypeWellFormedVisitor<'tcx> {
17201720
}
17211721
}
17221722

1723-
impl Visitor<'tcx> for CheckTypeWellFormedVisitor<'tcx> {
1723+
impl<'tcx> Visitor<'tcx> for CheckTypeWellFormedVisitor<'tcx> {
17241724
type Map = hir_map::Map<'tcx>;
17251725

17261726
fn nested_visit_map(&mut self) -> hir_visit::NestedVisitorMap<Self::Map> {

Diff for: compiler/rustc_typeck/src/check_unused.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub fn check_crate(tcx: TyCtxt<'_>) {
2121
unused_crates_lint(tcx);
2222
}
2323

24-
impl ItemLikeVisitor<'v> for CheckVisitor<'tcx> {
24+
impl <'v, 'tcx> ItemLikeVisitor<'v> for CheckVisitor<'tcx> {
2525
fn visit_item(&mut self, item: &hir::Item<'_>) {
2626
if item.vis.node.is_pub() || item.span.is_dummy() {
2727
return;
@@ -43,7 +43,7 @@ struct CheckVisitor<'tcx> {
4343
used_trait_imports: FxHashSet<LocalDefId>,
4444
}
4545

46-
impl CheckVisitor<'tcx> {
46+
impl<'tcx> CheckVisitor<'tcx> {
4747
fn check_import(&self, item_id: hir::ItemId, span: Span) {
4848
if !self.tcx.maybe_unused_trait_import(item_id.def_id) {
4949
return;

Diff for: compiler/rustc_typeck/src/coherence/builtin.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ fn visit_implementation_of_copy(tcx: TyCtxt<'_>, impl_did: LocalDefId) {
108108
}
109109
}
110110

111-
fn visit_implementation_of_coerce_unsized(tcx: TyCtxt<'tcx>, impl_did: LocalDefId) {
111+
fn visit_implementation_of_coerce_unsized(tcx: TyCtxt<'_>, impl_did: LocalDefId) {
112112
debug!("visit_implementation_of_coerce_unsized: impl_did={:?}", impl_did);
113113

114114
// Just compute this for the side-effects, in particular reporting
@@ -287,7 +287,7 @@ fn visit_implementation_of_dispatch_from_dyn(tcx: TyCtxt<'_>, impl_did: LocalDef
287287
})
288288
}
289289

290-
pub fn coerce_unsized_info(tcx: TyCtxt<'tcx>, impl_did: DefId) -> CoerceUnsizedInfo {
290+
pub fn coerce_unsized_info<'tcx>(tcx: TyCtxt<'tcx>, impl_did: DefId) -> CoerceUnsizedInfo {
291291
debug!("compute_coerce_unsized_info(impl_did={:?})", impl_did);
292292

293293
// this provider should only get invoked for local def-ids

Diff for: compiler/rustc_typeck/src/coherence/inherent_impls.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ struct InherentCollect<'tcx> {
3838
impls_map: CrateInherentImpls,
3939
}
4040

41-
impl ItemLikeVisitor<'v> for InherentCollect<'tcx> {
41+
impl<'v, 'tcx> ItemLikeVisitor<'v> for InherentCollect<'tcx> {
4242
fn visit_item(&mut self, item: &hir::Item<'_>) {
4343
let (ty, assoc_items) = match item.kind {
4444
hir::ItemKind::Impl(hir::Impl { of_trait: None, ref self_ty, items, .. }) => {
@@ -370,7 +370,7 @@ impl ItemLikeVisitor<'v> for InherentCollect<'tcx> {
370370
fn visit_foreign_item(&mut self, _foreign_item: &hir::ForeignItem<'_>) {}
371371
}
372372

373-
impl InherentCollect<'tcx> {
373+
impl<'tcx> InherentCollect<'tcx> {
374374
fn check_def_id(&mut self, item: &hir::Item<'_>, def_id: DefId) {
375375
if let Some(def_id) = def_id.as_local() {
376376
// Add the implementation to the mapping from implementation to base

Diff for: compiler/rustc_typeck/src/coherence/inherent_impls_overlap.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ struct InherentOverlapChecker<'tcx> {
1818
tcx: TyCtxt<'tcx>,
1919
}
2020

21-
impl InherentOverlapChecker<'tcx> {
21+
impl<'tcx> InherentOverlapChecker<'tcx> {
2222
/// Checks whether any associated items in impls 1 and 2 share the same identifier and
2323
/// namespace.
2424
fn impls_have_common_items(
@@ -115,7 +115,7 @@ impl InherentOverlapChecker<'tcx> {
115115
}
116116
}
117117

118-
impl ItemLikeVisitor<'v> for InherentOverlapChecker<'tcx> {
118+
impl<'v, 'tcx> ItemLikeVisitor<'v> for InherentOverlapChecker<'tcx> {
119119
fn visit_item(&mut self, item: &'v hir::Item<'v>) {
120120
match item.kind {
121121
hir::ItemKind::Enum(..)

Diff for: compiler/rustc_typeck/src/coherence/orphan.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ fn orphan_check_impl(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Result<(), ErrorRep
143143
Ok(())
144144
}
145145

146-
fn emit_orphan_check_error(
146+
fn emit_orphan_check_error<'tcx>(
147147
tcx: TyCtxt<'tcx>,
148148
sp: Span,
149149
trait_span: Span,

0 commit comments

Comments
 (0)