Skip to content

Commit

Permalink
Unrolled build for rust-lang#131194
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#131194 - practicalrs:fix_needless_lifetimes, r=celinval

Fix needless_lifetimes in stable_mir

Hi,

This PR fixes the following clippy warning in stable_mir

```
warning: the following explicit lifetimes could be elided: 'a
  --> compiler/stable_mir/src/mir/visit.rs:79:30
   |
79 |     fn visit_projection_elem<'a>(
   |                              ^^
80 |         &mut self,
81 |         place_ref: 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
   |
79 ~     fn visit_projection_elem(
80 |         &mut self,
81 ~         place_ref: PlaceRef<'_>,
   |
```

Best regards,
Michal
  • Loading branch information
rust-timer authored Oct 5, 2024
2 parents 495f75a + 8918a9d commit f008a7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/stable_mir/src/mir/visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ pub trait MirVisitor {
self.super_place(place, ptx, location)
}

fn visit_projection_elem<'a>(
fn visit_projection_elem(
&mut self,
place_ref: PlaceRef<'a>,
place_ref: PlaceRef<'_>,
elem: &ProjectionElem,
ptx: PlaceContext,
location: Location,
Expand Down

0 comments on commit f008a7d

Please sign in to comment.