Fix needless_lifetimes in stable_mir

This commit is contained in:
Michal Piotrowski 2024-10-16 13:31:23 +02:00
parent 1f67a7aa8d
commit a10a44956e
No known key found for this signature in database
GPG Key ID: 2538DC6C8E7C7859

View File

@ -487,7 +487,7 @@ pub struct PlaceRef<'a> {
pub projection: &'a [ProjectionElem],
}
impl<'a> PlaceRef<'a> {
impl PlaceRef<'_> {
/// Get the type of this place.
pub fn ty(&self, locals: &[LocalDecl]) -> Result<Ty, Error> {
self.projection.iter().fold(Ok(locals[self.local].ty), |place_ty, elem| elem.ty(place_ty?))