@@ -213,7 +213,7 @@ impl AssocItem {
213
213
}
214
214
}
215
215
216
- pub fn signature < ' tcx > ( & self , tcx : TyCtxt < ' tcx > ) -> String {
216
+ pub fn signature ( & self , tcx : TyCtxt < ' _ > ) -> String {
217
217
match self . kind {
218
218
ty:: AssocKind :: Method => {
219
219
// We skip the binder here because the binder would deanonymize all
@@ -2311,7 +2311,7 @@ impl<'tcx> AdtDef {
2311
2311
/// Returns an iterator over all fields contained
2312
2312
/// by this ADT.
2313
2313
#[ inline]
2314
- pub fn all_fields < ' s > ( & ' s self ) -> impl Iterator < Item = & ' s FieldDef > + Clone {
2314
+ pub fn all_fields ( & self ) -> impl Iterator < Item = & FieldDef > + Clone {
2315
2315
self . variants . iter ( ) . flat_map ( |v| v. fields . iter ( ) )
2316
2316
}
2317
2317
@@ -3111,7 +3111,7 @@ impl Iterator for AssocItemsIterator<'_> {
3111
3111
}
3112
3112
}
3113
3113
3114
- fn associated_item < ' tcx > ( tcx : TyCtxt < ' tcx > , def_id : DefId ) -> AssocItem {
3114
+ fn associated_item ( tcx : TyCtxt < ' _ > , def_id : DefId ) -> AssocItem {
3115
3115
let id = tcx. hir ( ) . as_local_hir_id ( def_id) . unwrap ( ) ;
3116
3116
let parent_id = tcx. hir ( ) . get_parent_item ( id) ;
3117
3117
let parent_def_id = tcx. hir ( ) . local_def_id_from_hir_id ( parent_id) ;
@@ -3156,7 +3156,7 @@ pub struct AdtSizedConstraint<'tcx>(pub &'tcx [Ty<'tcx>]);
3156
3156
/// such.
3157
3157
/// - a Error, if a type contained itself. The representability
3158
3158
/// check should catch this case.
3159
- fn adt_sized_constraint < ' tcx > ( tcx : TyCtxt < ' tcx > , def_id : DefId ) -> AdtSizedConstraint < ' tcx > {
3159
+ fn adt_sized_constraint ( tcx : TyCtxt < ' _ > , def_id : DefId ) -> AdtSizedConstraint < ' _ > {
3160
3160
let def = tcx. adt_def ( def_id) ;
3161
3161
3162
3162
let result = tcx. mk_type_list ( def. variants . iter ( ) . flat_map ( |v| {
@@ -3170,7 +3170,7 @@ fn adt_sized_constraint<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> AdtSizedConst
3170
3170
AdtSizedConstraint ( result)
3171
3171
}
3172
3172
3173
- fn associated_item_def_ids < ' tcx > ( tcx : TyCtxt < ' tcx > , def_id : DefId ) -> & ' tcx [ DefId ] {
3173
+ fn associated_item_def_ids ( tcx : TyCtxt < ' _ > , def_id : DefId ) -> & [ DefId ] {
3174
3174
let id = tcx. hir ( ) . as_local_hir_id ( def_id) . unwrap ( ) ;
3175
3175
let item = tcx. hir ( ) . expect_item ( id) ;
3176
3176
match item. node {
@@ -3193,14 +3193,14 @@ fn associated_item_def_ids<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> &'tcx [Def
3193
3193
}
3194
3194
}
3195
3195
3196
- fn def_span < ' tcx > ( tcx : TyCtxt < ' tcx > , def_id : DefId ) -> Span {
3196
+ fn def_span ( tcx : TyCtxt < ' _ > , def_id : DefId ) -> Span {
3197
3197
tcx. hir ( ) . span_if_local ( def_id) . unwrap ( )
3198
3198
}
3199
3199
3200
3200
/// If the given `DefId` describes an item belonging to a trait,
3201
3201
/// returns the `DefId` of the trait that the trait item belongs to;
3202
3202
/// otherwise, returns `None`.
3203
- fn trait_of_item < ' tcx > ( tcx : TyCtxt < ' tcx > , def_id : DefId ) -> Option < DefId > {
3203
+ fn trait_of_item ( tcx : TyCtxt < ' _ > , def_id : DefId ) -> Option < DefId > {
3204
3204
tcx. opt_associated_item ( def_id)
3205
3205
. and_then ( |associated_item| {
3206
3206
match associated_item. container {
@@ -3223,7 +3223,7 @@ pub fn is_impl_trait_defn(tcx: TyCtxt<'_>, def_id: DefId) -> Option<DefId> {
3223
3223
}
3224
3224
3225
3225
/// See `ParamEnv` struct definition for details.
3226
- fn param_env < ' tcx > ( tcx : TyCtxt < ' tcx > , def_id : DefId ) -> ParamEnv < ' tcx > {
3226
+ fn param_env ( tcx : TyCtxt < ' _ > , def_id : DefId ) -> ParamEnv < ' _ > {
3227
3227
// The param_env of an impl Trait type is its defining function's param_env
3228
3228
if let Some ( parent) = is_impl_trait_defn ( tcx, def_id) {
3229
3229
return param_env ( tcx, parent) ;
@@ -3258,17 +3258,17 @@ fn param_env<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> ParamEnv<'tcx> {
3258
3258
traits:: normalize_param_env_or_error ( tcx, def_id, unnormalized_env, cause)
3259
3259
}
3260
3260
3261
- fn crate_disambiguator < ' tcx > ( tcx : TyCtxt < ' tcx > , crate_num : CrateNum ) -> CrateDisambiguator {
3261
+ fn crate_disambiguator ( tcx : TyCtxt < ' _ > , crate_num : CrateNum ) -> CrateDisambiguator {
3262
3262
assert_eq ! ( crate_num, LOCAL_CRATE ) ;
3263
3263
tcx. sess . local_crate_disambiguator ( )
3264
3264
}
3265
3265
3266
- fn original_crate_name < ' tcx > ( tcx : TyCtxt < ' tcx > , crate_num : CrateNum ) -> Symbol {
3266
+ fn original_crate_name ( tcx : TyCtxt < ' _ > , crate_num : CrateNum ) -> Symbol {
3267
3267
assert_eq ! ( crate_num, LOCAL_CRATE ) ;
3268
3268
tcx. crate_name . clone ( )
3269
3269
}
3270
3270
3271
- fn crate_hash < ' tcx > ( tcx : TyCtxt < ' tcx > , crate_num : CrateNum ) -> Svh {
3271
+ fn crate_hash ( tcx : TyCtxt < ' _ > , crate_num : CrateNum ) -> Svh {
3272
3272
assert_eq ! ( crate_num, LOCAL_CRATE ) ;
3273
3273
tcx. hir ( ) . crate_hash
3274
3274
}
@@ -3288,7 +3288,7 @@ fn instance_def_size_estimate<'tcx>(tcx: TyCtxt<'tcx>, instance_def: InstanceDef
3288
3288
/// If `def_id` is an issue 33140 hack impl, returns its self type; otherwise, returns `None`.
3289
3289
///
3290
3290
/// See [`ImplOverlapKind::Issue33140`] for more details.
3291
- fn issue33140_self_ty < ' tcx > ( tcx : TyCtxt < ' tcx > , def_id : DefId ) -> Option < Ty < ' tcx > > {
3291
+ fn issue33140_self_ty ( tcx : TyCtxt < ' _ > , def_id : DefId ) -> Option < Ty < ' _ > > {
3292
3292
debug ! ( "issue33140_self_ty({:?})" , def_id) ;
3293
3293
3294
3294
let trait_ref = tcx. impl_trait_ref ( def_id) . unwrap_or_else ( || {
0 commit comments