mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
inline a function that is only used in clippy
This commit is contained in:
parent
8a5847f5c4
commit
1fcd04ed49
@ -163,10 +163,6 @@ impl Lifetime {
|
|||||||
(LifetimeSuggestionPosition::Normal, self.ident.span)
|
(LifetimeSuggestionPosition::Normal, self.ident.span)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn is_static(&self) -> bool {
|
|
||||||
self.res == LifetimeName::Static
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A `Path` is essentially Rust's notion of a name; for instance,
|
/// A `Path` is essentially Rust's notion of a name; for instance,
|
||||||
|
@ -176,7 +176,7 @@ fn check_fn_inner<'tcx>(
|
|||||||
_ => None,
|
_ => None,
|
||||||
});
|
});
|
||||||
for bound in lifetimes {
|
for bound in lifetimes {
|
||||||
if !bound.is_static() && !bound.is_elided() {
|
if bound.res != LifetimeName::Static && !bound.is_elided() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user