diff options
Diffstat (limited to 'crates/hir/src/semantics.rs')
-rw-r--r-- | crates/hir/src/semantics.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir/src/semantics.rs b/crates/hir/src/semantics.rs index 1198e3f0b..d3caeef4e 100644 --- a/crates/hir/src/semantics.rs +++ b/crates/hir/src/semantics.rs | |||
@@ -445,7 +445,7 @@ impl<'db> SemanticsImpl<'db> { | |||
445 | } | 445 | } |
446 | }; | 446 | }; |
447 | gpl.lifetime_params() | 447 | gpl.lifetime_params() |
448 | .find(|tp| tp.lifetime().as_ref().map(|lt| lt.text()) == Some(text)) | 448 | .find(|tp| tp.lifetime().as_ref().map(|lt| lt.text()).as_ref() == Some(&text)) |
449 | })?; | 449 | })?; |
450 | let src = self.find_file(lifetime_param.syntax().clone()).with_value(lifetime_param); | 450 | let src = self.find_file(lifetime_param.syntax().clone()).with_value(lifetime_param); |
451 | ToDef::to_def(self, src) | 451 | ToDef::to_def(self, src) |
@@ -768,7 +768,7 @@ to_def_impls![ | |||
768 | (crate::TypeParam, ast::TypeParam, type_param_to_def), | 768 | (crate::TypeParam, ast::TypeParam, type_param_to_def), |
769 | (crate::LifetimeParam, ast::LifetimeParam, lifetime_param_to_def), | 769 | (crate::LifetimeParam, ast::LifetimeParam, lifetime_param_to_def), |
770 | (crate::ConstParam, ast::ConstParam, const_param_to_def), | 770 | (crate::ConstParam, ast::ConstParam, const_param_to_def), |
771 | (crate::MacroDef, ast::MacroRules, macro_rules_to_def), | 771 | (crate::MacroDef, ast::Macro, macro_to_def), |
772 | (crate::Local, ast::IdentPat, bind_pat_to_def), | 772 | (crate::Local, ast::IdentPat, bind_pat_to_def), |
773 | (crate::Local, ast::SelfParam, self_param_to_def), | 773 | (crate::Local, ast::SelfParam, self_param_to_def), |
774 | (crate::Label, ast::Label, label_to_def), | 774 | (crate::Label, ast::Label, label_to_def), |