aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/resolver.rs
diff options
context:
space:
mode:
authorClemens Wasser <[email protected]>2021-06-07 12:59:01 +0100
committerClemens Wasser <[email protected]>2021-06-21 15:40:21 +0100
commit47747cd4120e260a144242aadd7732e11d133fe4 (patch)
treeba767d7da808c050e313446ac4cb90d810d0f4de /crates/hir_def/src/resolver.rs
parent4402f2b280f58896ed0696f4243d88a58fd970ca (diff)
Apply some clippy suggestions
Diffstat (limited to 'crates/hir_def/src/resolver.rs')
-rw-r--r--crates/hir_def/src/resolver.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/hir_def/src/resolver.rs b/crates/hir_def/src/resolver.rs
index 49c573087..a11439c3b 100644
--- a/crates/hir_def/src/resolver.rs
+++ b/crates/hir_def/src/resolver.rs
@@ -388,9 +388,9 @@ impl Resolver {
388 self.module_scope().map(|t| t.0.krate()) 388 self.module_scope().map(|t| t.0.krate())
389 } 389 }
390 390
391 pub fn where_predicates_in_scope<'a>( 391 pub fn where_predicates_in_scope(
392 &'a self, 392 &self,
393 ) -> impl Iterator<Item = &'a crate::generics::WherePredicate> + 'a { 393 ) -> impl Iterator<Item = &crate::generics::WherePredicate> {
394 self.scopes 394 self.scopes
395 .iter() 395 .iter()
396 .rev() 396 .rev()
@@ -464,16 +464,16 @@ impl Scope {
464 &Scope::GenericParams { ref params, def: parent } => { 464 &Scope::GenericParams { ref params, def: parent } => {
465 for (local_id, param) in params.types.iter() { 465 for (local_id, param) in params.types.iter() {
466 if let Some(ref name) = param.name { 466 if let Some(ref name) = param.name {
467 let id = TypeParamId { local_id, parent }; 467 let id = TypeParamId { parent, local_id };
468 f(name.clone(), ScopeDef::GenericParam(id.into())) 468 f(name.clone(), ScopeDef::GenericParam(id.into()))
469 } 469 }
470 } 470 }
471 for (local_id, param) in params.consts.iter() { 471 for (local_id, param) in params.consts.iter() {
472 let id = ConstParamId { local_id, parent }; 472 let id = ConstParamId { parent, local_id };
473 f(param.name.clone(), ScopeDef::GenericParam(id.into())) 473 f(param.name.clone(), ScopeDef::GenericParam(id.into()))
474 } 474 }
475 for (local_id, param) in params.lifetimes.iter() { 475 for (local_id, param) in params.lifetimes.iter() {
476 let id = LifetimeParamId { local_id, parent }; 476 let id = LifetimeParamId { parent, local_id };
477 f(param.name.clone(), ScopeDef::GenericParam(id.into())) 477 f(param.name.clone(), ScopeDef::GenericParam(id.into()))
478 } 478 }
479 } 479 }