diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-03-24 10:17:12 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-03-24 10:17:12 +0000 |
commit | 2aa64831e578406f85e68adf27e519175e1e532d (patch) | |
tree | ac288ca7b8a25ea41d8b66ed2deeedb33d5c8df8 /crates/test_utils/src | |
parent | 5f9ba2d589afaaec91ee79bfc7fa3aba636916f2 (diff) | |
parent | 903a2e98f93df87af19375e951c56e7c285989d4 (diff) |
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 <[email protected]>
Diffstat (limited to 'crates/test_utils/src')
0 files changed, 0 insertions, 0 deletions