As @matklad mentions here,goto_definition should not navigate to the local variable defined in macros.
macro_rules! m {
() => {
let x = 2;
};
}
#[test]
fn test_hygiene() {
let x = 1;
m!();
println!("{}", x)
}
When I put the cursor on the x in println!, use goto_definition, it will navigate to macro call m!().
Similarly, highlight_related should not highlight m! when I put the cursor on the x.