diff options
Diffstat (limited to 'crates/ra_hir_expand/src/builtin_macro.rs')
-rw-r--r-- | crates/ra_hir_expand/src/builtin_macro.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crates/ra_hir_expand/src/builtin_macro.rs b/crates/ra_hir_expand/src/builtin_macro.rs index be5f3cbe3..e5046ad4c 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 { | |||
34 | ast_id: AstId<ast::MacroCall>, | 34 | ast_id: AstId<ast::MacroCall>, |
35 | ) -> Option<MacroDefId> { | 35 | ) -> Option<MacroDefId> { |
36 | let kind = match ident { | 36 | let kind = match ident { |
37 | $( id if id == &name::$name => BuiltinFnLikeExpander::$kind, )* | 37 | $( id if id == &name::N![$name] => BuiltinFnLikeExpander::$kind, )* |
38 | _ => return None, | 38 | _ => return None, |
39 | }; | 39 | }; |
40 | 40 | ||
@@ -44,15 +44,15 @@ macro_rules! register_builtin { | |||
44 | } | 44 | } |
45 | 45 | ||
46 | register_builtin! { | 46 | register_builtin! { |
47 | (COLUMN_MACRO, Column) => column_expand, | 47 | (column, Column) => column_expand, |
48 | (COMPILE_ERROR_MACRO, CompileError) => compile_error_expand, | 48 | (compile_error, CompileError) => compile_error_expand, |
49 | (FILE_MACRO, File) => file_expand, | 49 | (file, File) => file_expand, |
50 | (LINE_MACRO, Line) => line_expand, | 50 | (line, Line) => line_expand, |
51 | (STRINGIFY_MACRO, Stringify) => stringify_expand, | 51 | (stringify, Stringify) => stringify_expand, |
52 | (FORMAT_ARGS_MACRO, FormatArgs) => format_args_expand, | 52 | (format_args, FormatArgs) => format_args_expand, |
53 | // format_args_nl only differs in that it adds a newline in the end, | 53 | // format_args_nl only differs in that it adds a newline in the end, |
54 | // so we use the same stub expansion for now | 54 | // so we use the same stub expansion for now |
55 | (FORMAT_ARGS_NL_MACRO, FormatArgsNl) => format_args_expand | 55 | (format_args_nl, FormatArgsNl) => format_args_expand |
56 | } | 56 | } |
57 | 57 | ||
58 | fn to_line_number(db: &dyn AstDatabase, file: HirFileId, pos: TextUnit) -> usize { | 58 | fn to_line_number(db: &dyn AstDatabase, file: HirFileId, pos: TextUnit) -> usize { |