diff options
author | Florian Diebold <[email protected]> | 2019-12-13 20:43:53 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2019-12-13 21:33:37 +0000 |
commit | 259c42f00e2e85594c7373166bc8467ce375a045 (patch) | |
tree | e3c3c855a4bcb7ba425f9d788a9a383a529557c3 /crates/ra_hir | |
parent | 169fe4932f84f396965a4814c44e31061673937c (diff) |
Add macros for known names and paths
Diffstat (limited to 'crates/ra_hir')
-rw-r--r-- | crates/ra_hir/src/code_model.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index c705d1630..d1153fa62 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs | |||
@@ -17,7 +17,7 @@ use hir_def::{ | |||
17 | }; | 17 | }; |
18 | use hir_expand::{ | 18 | use hir_expand::{ |
19 | diagnostics::DiagnosticSink, | 19 | diagnostics::DiagnosticSink, |
20 | name::{self, AsName}, | 20 | name::{AsName, N}, |
21 | MacroDefId, | 21 | MacroDefId, |
22 | }; | 22 | }; |
23 | use hir_ty::{ | 23 | use hir_ty::{ |
@@ -723,7 +723,7 @@ impl Local { | |||
723 | } | 723 | } |
724 | 724 | ||
725 | pub fn is_self(self, db: &impl HirDatabase) -> bool { | 725 | pub fn is_self(self, db: &impl HirDatabase) -> bool { |
726 | self.name(db) == Some(name::SELF_PARAM) | 726 | self.name(db) == Some(N![self]) |
727 | } | 727 | } |
728 | 728 | ||
729 | pub fn is_mut(self, db: &impl HirDatabase) -> bool { | 729 | pub fn is_mut(self, db: &impl HirDatabase) -> bool { |