mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
fix: fix expansion order for fn-like macros and attributes in token descending
This commit is contained in:
parent
6eecd84771
commit
bb946f78f6
3 changed files with 76 additions and 54 deletions
|
@ -220,6 +220,29 @@ mod tests {
|
|||
assert!(navs.is_empty(), "didn't expect this to resolve anywhere: {:?}", navs)
|
||||
}
|
||||
|
||||
#[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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue