Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_expand/src/hygiene.rs')
| -rw-r--r-- | crates/hir_expand/src/hygiene.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/crates/hir_expand/src/hygiene.rs b/crates/hir_expand/src/hygiene.rs index b2879e37c3..51f14d684c 100644 --- a/crates/hir_expand/src/hygiene.rs +++ b/crates/hir_expand/src/hygiene.rs @@ -160,11 +160,9 @@ impl HygieneInfo { InFile::new(loc.kind.file_id(), loc.kind.arg(db)?.text_range().start()), ), mbe::Origin::Def => match (&*self.macro_def, &self.attr_input_or_mac_def_start) { - ( - TokenExpander::MacroDef { def_site_token_map, .. } - | TokenExpander::MacroRules { def_site_token_map, .. }, - Some(tt), - ) => (def_site_token_map, *tt), + (TokenExpander::DeclarativeMacro { def_site_token_map, .. }, Some(tt)) => { + (def_site_token_map, *tt) + } _ => panic!("`Origin::Def` used with non-`macro_rules!` macro"), }, }, |