diff options
Diffstat (limited to 'crates/ra_hir_expand/src')
-rw-r--r-- | crates/ra_hir_expand/src/builtin_macro.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_expand/src/db.rs | 9 |
2 files changed, 5 insertions, 6 deletions
diff --git a/crates/ra_hir_expand/src/builtin_macro.rs b/crates/ra_hir_expand/src/builtin_macro.rs index 1749b491b..857f8a444 100644 --- a/crates/ra_hir_expand/src/builtin_macro.rs +++ b/crates/ra_hir_expand/src/builtin_macro.rs | |||
@@ -138,7 +138,7 @@ fn to_col_number(db: &dyn AstDatabase, file: HirFileId, pos: TextUnit) -> usize | |||
138 | if c == '\n' { | 138 | if c == '\n' { |
139 | break; | 139 | break; |
140 | } | 140 | } |
141 | col_num = col_num + 1; | 141 | col_num += 1; |
142 | } | 142 | } |
143 | col_num | 143 | col_num |
144 | } | 144 | } |
diff --git a/crates/ra_hir_expand/src/db.rs b/crates/ra_hir_expand/src/db.rs index f68aca789..42e599fec 100644 --- a/crates/ra_hir_expand/src/db.rs +++ b/crates/ra_hir_expand/src/db.rs | |||
@@ -93,12 +93,11 @@ pub(crate) fn macro_def( | |||
93 | Some(Arc::new((TokenExpander::MacroRules(rules), tmap))) | 93 | Some(Arc::new((TokenExpander::MacroRules(rules), tmap))) |
94 | } | 94 | } |
95 | MacroDefKind::BuiltIn(expander) => { | 95 | MacroDefKind::BuiltIn(expander) => { |
96 | Some(Arc::new((TokenExpander::Builtin(expander.clone()), mbe::TokenMap::default()))) | 96 | Some(Arc::new((TokenExpander::Builtin(expander), mbe::TokenMap::default()))) |
97 | } | ||
98 | MacroDefKind::BuiltInDerive(expander) => { | ||
99 | Some(Arc::new((TokenExpander::BuiltinDerive(expander), mbe::TokenMap::default()))) | ||
97 | } | 100 | } |
98 | MacroDefKind::BuiltInDerive(expander) => Some(Arc::new(( | ||
99 | TokenExpander::BuiltinDerive(expander.clone()), | ||
100 | mbe::TokenMap::default(), | ||
101 | ))), | ||
102 | } | 101 | } |
103 | } | 102 | } |
104 | 103 | ||