diff options
Diffstat (limited to 'crates/hir_expand/src/hygiene.rs')
-rw-r--r-- | crates/hir_expand/src/hygiene.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/hir_expand/src/hygiene.rs b/crates/hir_expand/src/hygiene.rs index 87cad326d..e758b3c0a 100644 --- a/crates/hir_expand/src/hygiene.rs +++ b/crates/hir_expand/src/hygiene.rs | |||
@@ -145,7 +145,7 @@ fn make_hygiene_info( | |||
145 | ) -> Option<HygieneInfo> { | 145 | ) -> Option<HygieneInfo> { |
146 | let arg_tt = loc.kind.arg(db)?; | 146 | let arg_tt = loc.kind.arg(db)?; |
147 | 147 | ||
148 | let def_offset = loc.def.ast_id.and_then(|id| { | 148 | let def_offset = loc.def.ast_id().and_then(|id| { |
149 | let def_tt = match id.to_node(db) { | 149 | let def_tt = match id.to_node(db) { |
150 | ast::Macro::MacroRules(mac) => mac.token_tree()?.syntax().text_range().start(), | 150 | ast::Macro::MacroRules(mac) => mac.token_tree()?.syntax().text_range().start(), |
151 | ast::Macro::MacroDef(_) => return None, | 151 | ast::Macro::MacroDef(_) => return None, |
@@ -176,12 +176,12 @@ impl HygieneFrame { | |||
176 | let loc = db.lookup_intern_macro(id); | 176 | let loc = db.lookup_intern_macro(id); |
177 | let info = make_hygiene_info(db, macro_file, &loc); | 177 | let info = make_hygiene_info(db, macro_file, &loc); |
178 | match loc.def.kind { | 178 | match loc.def.kind { |
179 | MacroDefKind::Declarative => { | 179 | MacroDefKind::Declarative(_) => { |
180 | (info, Some(loc.def.krate), loc.def.local_inner) | 180 | (info, Some(loc.def.krate), loc.def.local_inner) |
181 | } | 181 | } |
182 | MacroDefKind::BuiltIn(_) => (info, Some(loc.def.krate), false), | 182 | MacroDefKind::BuiltIn(..) => (info, Some(loc.def.krate), false), |
183 | MacroDefKind::BuiltInDerive(_) => (info, None, false), | 183 | MacroDefKind::BuiltInDerive(..) => (info, None, false), |
184 | MacroDefKind::BuiltInEager(_) => (info, None, false), | 184 | MacroDefKind::BuiltInEager(..) => (info, None, false), |
185 | MacroDefKind::ProcMacro(_) => (info, None, false), | 185 | MacroDefKind::ProcMacro(_) => (info, None, false), |
186 | } | 186 | } |
187 | } | 187 | } |