File tree Expand file tree Collapse file tree
crates/ide-assists/src/handlers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -733,6 +733,7 @@ fn check_def_in_mod_and_out_sel(
733733 Definition :: Static ( x) => check_item ! ( x) ,
734734 Definition :: Trait ( x) => check_item ! ( x) ,
735735 Definition :: TypeAlias ( x) => check_item ! ( x) ,
736+ Definition :: Macro ( x) => check_item ! ( x) ,
736737 _ => { }
737738 }
738739
@@ -1813,4 +1814,33 @@ mod foo {
18131814"# ,
18141815 )
18151816 }
1817+
1818+ #[ test]
1819+ fn test_extract_module_macro_call_import ( ) {
1820+ check_assist (
1821+ extract_module,
1822+ r"
1823+ macro_rules! my_macro {
1824+ () => {};
1825+ }
1826+
1827+ $0fn bar() {
1828+ my_macro!();
1829+ }$0
1830+ " ,
1831+ r"
1832+ macro_rules! my_macro {
1833+ () => {};
1834+ }
1835+
1836+ mod modname {
1837+ use super::my_macro;
1838+
1839+ pub(crate) fn bar() {
1840+ my_macro!();
1841+ }
1842+ }
1843+ " ,
1844+ )
1845+ }
18161846}
You can’t perform that action at this time.
0 commit comments