Skip to content

Commit 7d1ff20

Browse files
authored
Rollup merge of #131778 - practicalrs:fix_needless_lifetimes, r=jieyouxu
Fix needless_lifetimes in stable_mir Hi, This PR fixes the following clippy warning ``` warning: the following explicit lifetimes could be elided: 'a --> compiler/stable_mir/src/mir/visit.rs:490:6 | 490 | impl<'a> PlaceRef<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 490 - impl<'a> PlaceRef<'a> { 490 + impl PlaceRef<'_> { | ``` Best regards, Michal
2 parents 3a8ff7a + a10a449 commit 7d1ff20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: compiler/stable_mir/src/mir/visit.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ pub struct PlaceRef<'a> {
477477
pub projection: &'a [ProjectionElem],
478478
}
479479

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

0 commit comments

Comments
 (0)