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.
As @matklad mentions here,
goto_definitionshould not navigate to the local variable defined in macros.When I put the cursor on the x in
println!, usegoto_definition, it will navigate to macro callm!().Similarly,
highlight_relatedshould not highlightm!when I put the cursor on the x.