From 2163ceb7ef0fc3c5268c9ca5f48bb50ae311947f Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Tue, 14 Jul 2020 17:23:33 +0200 Subject: Fix classify_name_ref on multi-path macro calls --- crates/ra_ide/src/goto_definition.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'crates/ra_ide/src') diff --git a/crates/ra_ide/src/goto_definition.rs b/crates/ra_ide/src/goto_definition.rs index f575d738f..c30b20611 100644 --- a/crates/ra_ide/src/goto_definition.rs +++ b/crates/ra_ide/src/goto_definition.rs @@ -866,4 +866,22 @@ type Alias = T<|>; "#, ) } + + #[test] + fn goto_def_for_macro_container() { + check( + r#" +//- /lib.rs +foo::module<|>::mac!(); + +//- /foo/lib.rs +pub mod module { + //^^^^^^ + #[macro_export] + macro_rules! _mac { () => { () } } + pub use crate::_mac as mac; +} +"#, + ); + } } -- cgit v1.2.3