fix: Use original definition ranges for ide_db::search instead of the expanded ranges

This commit is contained in:
Lukas Wirth 2021-09-14 02:49:06 +02:00
parent e08b3bf70b
commit 6f9de71402
2 changed files with 34 additions and 32 deletions

View file

@ -413,6 +413,22 @@ fn foo() {
);
}
#[test]
fn test_hl_local_in_attr() {
check(
r#"
//- proc_macros: identity
#[proc_macros::identity]
fn foo() {
let mut bar = 3;
// ^^^ write
bar$0;
// ^^^ read
}
"#,
);
}
#[test]
fn test_multi_macro_usage() {
check(