diff options
| author | Lukas Wirth <lukastw97@gmail.com> | 2021-09-14 02:49:06 +0200 |
|---|---|---|
| committer | Lukas Wirth <lukastw97@gmail.com> | 2021-09-14 02:49:06 +0200 |
| commit | 6f9de71402f6faa5598cf587f76f22be7c6e1635 (patch) | |
| tree | b5cecbaf16f2faaa7bd06fc7a88b0e980bc5ceb4 /crates/ide/src | |
| parent | e08b3bf70bee5b091442d296e36769a67af7d6f1 (diff) | |
| download | rust-6f9de71402f6faa5598cf587f76f22be7c6e1635.tar.gz rust-6f9de71402f6faa5598cf587f76f22be7c6e1635.zip | |
fix: Use original definition ranges for ide_db::search instead of the expanded ranges
Diffstat (limited to 'crates/ide/src')
| -rw-r--r-- | crates/ide/src/highlight_related.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/crates/ide/src/highlight_related.rs b/crates/ide/src/highlight_related.rs index 6994e41c8aa..7cce99c3b0b 100644 --- a/crates/ide/src/highlight_related.rs +++ b/crates/ide/src/highlight_related.rs @@ -414,6 +414,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( r#" |
