mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
remove unnecessary lifetimes that can be elided
This commit is contained in:
parent
8615bba105
commit
4f8ffd0ba4
11 changed files with 49 additions and 63 deletions
|
@ -55,10 +55,7 @@ impl TraitEnvironment {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn traits_in_scope_from_clauses<'a>(
|
||||
&'a self,
|
||||
ty: Ty,
|
||||
) -> impl Iterator<Item = TraitId> + 'a {
|
||||
pub fn traits_in_scope_from_clauses(&self, ty: Ty) -> impl Iterator<Item = TraitId> + '_ {
|
||||
self.traits_from_clauses
|
||||
.iter()
|
||||
.filter_map(move |(self_ty, trait_id)| (*self_ty == ty).then_some(*trait_id))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue