1
Fork 0

Rollup merge of #129510 - GrigorenkoPV:fix-elided-named-lifetimes, r=cjgillot

Fix `elided_named_lifetimes` in code

https://github.com/rust-lang/rust/pull/129207#issuecomment-2308428671

r? cjgillot
This commit is contained in:
Matthias Krüger 2024-08-24 22:14:15 +02:00 committed by GitHub
commit e664ff5d8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 18 additions and 15 deletions

View file

@ -269,7 +269,7 @@ impl<'tcx> Generics {
}
/// Returns the `GenericParamDef` associated with this `ParamConst`.
pub fn const_param(&'tcx self, param: ParamConst, tcx: TyCtxt<'tcx>) -> &GenericParamDef {
pub fn const_param(&'tcx self, param: ParamConst, tcx: TyCtxt<'tcx>) -> &'tcx GenericParamDef {
let param = self.param_at(param.index as usize, tcx);
match param.kind {
GenericParamDefKind::Const { .. } => param,