From 47747cd4120e260a144242aadd7732e11d133fe4 Mon Sep 17 00:00:00 2001 From: Clemens Wasser Date: Mon, 7 Jun 2021 13:59:01 +0200 Subject: Apply some clippy suggestions --- crates/hir_def/src/resolver.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'crates/hir_def/src/resolver.rs') 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 { self.module_scope().map(|t| t.0.krate()) } - pub fn where_predicates_in_scope<'a>( - &'a self, - ) -> impl Iterator + 'a { + pub fn where_predicates_in_scope( + &self, + ) -> impl Iterator { self.scopes .iter() .rev() @@ -464,16 +464,16 @@ impl Scope { &Scope::GenericParams { ref params, def: parent } => { for (local_id, param) in params.types.iter() { if let Some(ref name) = param.name { - let id = TypeParamId { local_id, parent }; + let id = TypeParamId { parent, local_id }; f(name.clone(), ScopeDef::GenericParam(id.into())) } } for (local_id, param) in params.consts.iter() { - let id = ConstParamId { local_id, parent }; + let id = ConstParamId { parent, local_id }; f(param.name.clone(), ScopeDef::GenericParam(id.into())) } for (local_id, param) in params.lifetimes.iter() { - let id = LifetimeParamId { local_id, parent }; + let id = LifetimeParamId { parent, local_id }; f(param.name.clone(), ScopeDef::GenericParam(id.into())) } } -- cgit v1.2.3