rust-analyzer/crates
bors[bot] 2aa64831e5
Merge #8183
8183: Fix missing command error with macros r=Veykril a=brandondong

**Reproduction:**
1. Define a struct through a macro (can be via `macro_rules`, proc macro, or `include!()`).
2. !!MISSING: command!! annotation appears. Clicking on it results in an error message. No matter where the macro is called/defined, the annotation is always at the start of the file.
![image](https://user-images.githubusercontent.com/13722457/112268785-bce14500-8c34-11eb-9a23-bafd63ffd6ef.png)

**Cause:**
- For struct `A`, a `HasImpls` annotation is added just like for struct `B`. Unlike `B`, the file id for `A` is not the file we are adding annotations to but a macro file.
- The resolving step of the code lens does not succeed.

**Fix:**
- Check that the files match before computing offsets and adding `HasImpls`/`HasReferences` annotations.

Co-authored-by: Brandon <brandondong604@hotmail.com>
2021-03-24 10:17:12 +00:00
..
base_db Improve readability 2021-03-23 13:04:43 +03:00
cfg a lot of clippy::style fixes 2021-03-21 16:15:41 +01:00
flycheck Bump cargo_metadata 2021-03-02 14:27:29 +02:00
hir simplify 2021-03-23 17:49:06 +01:00
hir_def Merge bang-macros and derives in name resolution 2021-03-23 17:23:10 +01:00
hir_expand Clean up implementation 2021-03-24 00:47:55 -07:00
hir_ty Merge #8156 2021-03-22 20:39:58 +00:00
ide Clean up implementation 2021-03-24 00:47:55 -07:00
ide_assists Cleanup 2021-03-23 19:59:33 +03:00
ide_completion Merge hir::MacroDef::is_* into hir::MacroDef::kind 2021-03-23 11:32:14 +01:00
ide_db Cleanup Definition::search_scope 2021-03-23 13:03:55 +01:00
ide_ssr clippy::complexity simplifications related to Iterators 2021-03-21 13:13:34 +01:00
mbe a lot of clippy::style fixes 2021-03-21 16:15:41 +01:00
parser Parse extended_key_value_attributes 2021-03-19 02:13:46 +01:00
paths Document paths items 2021-01-22 15:38:33 +01:00
proc_macro_api Trim down IPC json size 2021-03-24 15:01:37 +08:00
proc_macro_srv Improve message usage in proc-macro 2021-03-24 03:51:06 +08:00
proc_macro_test Add description for crates that will be published 2020-08-24 13:07:22 +02:00
profile add more counts 2021-01-27 12:39:19 +03:00
project_model clippy::complexity simplifications related to Iterators 2021-03-21 13:13:34 +01:00
rust-analyzer Merge #8177 2021-03-24 08:53:48 +00:00
stdx Cleanup decl_check 2021-02-05 16:09:45 +01:00
syntax Simplify code 2021-03-23 19:41:15 +03:00
test_utils Add new_source_root meta to test fixtures 2021-03-16 15:28:02 +01:00
text_edit Avoid turning completion objects into builders 2020-11-16 23:16:41 +02:00
toolchain Add description for crates that will be published 2020-08-24 13:07:22 +02:00
tt a lot of clippy::style fixes 2021-03-21 16:15:41 +01:00
vfs Fix slow tests sometimes failing 2021-02-12 16:31:16 +01:00
vfs-notify Fix slow tests sometimes failing 2021-02-12 16:31:16 +01:00