1
Fork 0

rustc: Remove needless lifetimes

This commit is contained in:
Jeremy Stucki 2022-12-20 22:10:40 +01:00
parent 65bd2a6a73
commit 3dde32ca97
No known key found for this signature in database
GPG key ID: D2A1E19158A33812
109 changed files with 266 additions and 320 deletions

View file

@ -149,7 +149,7 @@ enum DefUse {
}
impl DefUse {
fn apply<'tcx>(trans: &mut impl GenKill<Local>, place: Place<'tcx>, context: PlaceContext) {
fn apply(trans: &mut impl GenKill<Local>, place: Place<'_>, context: PlaceContext) {
match DefUse::for_place(place, context) {
Some(DefUse::Def) => trans.kill(place.local),
Some(DefUse::Use) => trans.gen(place.local),
@ -157,7 +157,7 @@ impl DefUse {
}
}
fn for_place<'tcx>(place: Place<'tcx>, context: PlaceContext) -> Option<DefUse> {
fn for_place(place: Place<'_>, context: PlaceContext) -> Option<DefUse> {
match context {
PlaceContext::NonUse(_) => None,

View file

@ -823,7 +823,7 @@ fn iter_fields<'tcx>(
}
/// Returns all locals with projections that have their reference or address taken.
fn excluded_locals<'tcx>(body: &Body<'tcx>) -> IndexVec<Local, bool> {
fn excluded_locals(body: &Body<'_>) -> IndexVec<Local, bool> {
struct Collector {
result: IndexVec<Local, bool>,
}