Add macros for known names and paths

This commit is contained in:
Florian Diebold 2019-12-13 21:43:53 +01:00
parent 169fe4932f
commit 259c42f00e
16 changed files with 185 additions and 166 deletions

View file

@ -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 {