diff options
author | Jonas Schievink <[email protected]> | 2020-07-14 16:23:33 +0100 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2020-07-14 16:23:33 +0100 |
commit | 2163ceb7ef0fc3c5268c9ca5f48bb50ae311947f (patch) | |
tree | 9514018f43d9c6220241b6afa78c6e5d6febb612 /crates/ra_ide/src | |
parent | 139214d8ca9b42a3966b45decd820d11cc056714 (diff) |
Fix classify_name_ref on multi-path macro calls
Diffstat (limited to 'crates/ra_ide/src')
-rw-r--r-- | crates/ra_ide/src/goto_definition.rs | 18 |
1 files changed, 18 insertions, 0 deletions
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> = T<|>; | |||
866 | "#, | 866 | "#, |
867 | ) | 867 | ) |
868 | } | 868 | } |
869 | |||
870 | #[test] | ||
871 | fn goto_def_for_macro_container() { | ||
872 | check( | ||
873 | r#" | ||
874 | //- /lib.rs | ||
875 | foo::module<|>::mac!(); | ||
876 | |||
877 | //- /foo/lib.rs | ||
878 | pub mod module { | ||
879 | //^^^^^^ | ||
880 | #[macro_export] | ||
881 | macro_rules! _mac { () => { () } } | ||
882 | pub use crate::_mac as mac; | ||
883 | } | ||
884 | "#, | ||
885 | ); | ||
886 | } | ||
869 | } | 887 | } |