From 6911bc89a784ce72b4dfd8e0ba72bd22ce898395 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Fri, 13 Dec 2019 22:01:06 +0100 Subject: Rename N! to name! --- crates/ra_hir_expand/src/builtin_derive.rs | 2 +- crates/ra_hir_expand/src/builtin_macro.rs | 2 +- crates/ra_hir_expand/src/name.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/ra_hir_expand') diff --git a/crates/ra_hir_expand/src/builtin_derive.rs b/crates/ra_hir_expand/src/builtin_derive.rs index d7f8ada78..b26441253 100644 --- a/crates/ra_hir_expand/src/builtin_derive.rs +++ b/crates/ra_hir_expand/src/builtin_derive.rs @@ -34,7 +34,7 @@ macro_rules! register_builtin { pub fn find_builtin_derive(ident: &name::Name) -> Option { let kind = match ident { - $( id if id == &name::N![$trait] => BuiltinDeriveExpander::$trait, )* + $( id if id == &name::name![$trait] => BuiltinDeriveExpander::$trait, )* _ => return None, }; diff --git a/crates/ra_hir_expand/src/builtin_macro.rs b/crates/ra_hir_expand/src/builtin_macro.rs index e5046ad4c..d2b3d769e 100644 --- a/crates/ra_hir_expand/src/builtin_macro.rs +++ b/crates/ra_hir_expand/src/builtin_macro.rs @@ -34,7 +34,7 @@ macro_rules! register_builtin { ast_id: AstId, ) -> Option { let kind = match ident { - $( id if id == &name::N![$name] => BuiltinFnLikeExpander::$kind, )* + $( id if id == &name::name![$name] => BuiltinFnLikeExpander::$kind, )* _ => return None, }; diff --git a/crates/ra_hir_expand/src/name.rs b/crates/ra_hir_expand/src/name.rs index 8b3141d75..59d8214fd 100644 --- a/crates/ra_hir_expand/src/name.rs +++ b/crates/ra_hir_expand/src/name.rs @@ -186,7 +186,7 @@ pub mod known { pub const SELF_TYPE: super::Name = super::Name::new_inline_ascii(b"Self"); #[macro_export] - macro_rules! N { + macro_rules! name { (self) => { $crate::name::known::SELF_PARAM }; @@ -199,4 +199,4 @@ pub mod known { } } -pub use crate::N; +pub use crate::name; -- cgit v1.2.3