Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/goto_definition.rs')
| -rw-r--r-- | crates/ide/src/goto_definition.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/crates/ide/src/goto_definition.rs b/crates/ide/src/goto_definition.rs index ca22b10dfc..645b405e5e 100644 --- a/crates/ide/src/goto_definition.rs +++ b/crates/ide/src/goto_definition.rs @@ -221,6 +221,29 @@ mod tests { } #[test] + fn goto_def_in_mac_call_in_attr_invoc() { + check( + r#" +//- proc_macros: identity +pub struct Struct { + // ^^^^^^ + field: i32, +} + +macro_rules! identity { + ($($tt:tt)*) => {$($tt)*}; +} + +#[proc_macros::identity] +fn function() { + identity!(Struct$0 { field: 0 }); +} + +"#, + ) + } + + #[test] fn goto_def_for_extern_crate() { check( r#" |