From 259c42f00e2e85594c7373166bc8467ce375a045 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Fri, 13 Dec 2019 21:43:53 +0100 Subject: Add macros for known names and paths --- crates/ra_hir/src/code_model.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir/src') 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::{ }; use hir_expand::{ diagnostics::DiagnosticSink, - name::{self, AsName}, + name::{AsName, N}, MacroDefId, }; use hir_ty::{ @@ -723,7 +723,7 @@ impl Local { } pub fn is_self(self, db: &impl HirDatabase) -> bool { - self.name(db) == Some(name::SELF_PARAM) + self.name(db) == Some(N![self]) } pub fn is_mut(self, db: &impl HirDatabase) -> bool { -- cgit v1.2.3