rust-analyzer/crates
bors[bot] 97409e5fc8
Merge #9970
9970: feat: Implement attribute input token mapping, fix attribute item token mapping r=Veykril a=Veykril

![image](https://user-images.githubusercontent.com/3757771/130328577-4c1ad72c-51b1-47c3-8d3d-3242ec44a355.png)

The token mapping for items with attributes got overwritten partially by the attributes non-item input, since attributes have two different inputs, the item and the direct input both.
This PR gives attributes a second TokenMap for its direct input. We now shift all normal input IDs by the item input maximum(we maybe wanna swap this see below) similar to what we do for macro-rules/def. For mapping down we then have to figure out whether we are inside the direct attribute input or its item input to pick the appropriate mapping which can be done with some token range comparisons.

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/9867

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-08-27 19:30:36 +00:00
..
base_db feat: include full path in the cyclic deps error 2021-08-18 15:35:04 +03:00
cfg internal: remove useless helpers 2021-08-09 15:58:21 +03:00
flycheck internal: a bit more of cwd safety for flycheck 2021-07-17 18:13:35 +03:00
hir Merge #9970 2021-08-27 19:30:36 +00:00
hir_def Merge #9970 2021-08-27 19:30:36 +00:00
hir_expand Merge #9970 2021-08-27 19:30:36 +00:00
hir_ty Refactor & improve handling of overloaded binary operators 2021-08-22 17:35:50 +02:00
ide fix: Fix multiple derives in one attribute not expanding all in expand_macro 2021-08-26 03:32:45 +02:00
ide_assists Remove incorrect assertion in extract_function 2021-08-27 19:58:57 +02:00
ide_completion Don't use fake text range in original node search as is in completions 2021-08-27 15:10:42 +02:00
ide_db Rename fails on renaming definitions created by macros 2021-08-20 00:12:47 +02:00
ide_diagnostics Merge #9810 2021-08-08 10:35:00 +00:00
ide_ssr fix: avoid pathological macro expansions 2021-08-09 16:15:02 +03:00
limit internal: add API to check what are the max limits in practice 2021-07-31 18:26:43 +03:00
mbe Merge #9970 2021-08-27 19:30:36 +00:00
parser Fix three more (reverse) “a”/“an” typos 2021-08-22 17:48:15 +02:00
paths Fix typos “a”→“an” 2021-08-22 14:31:37 +02:00
proc_macro_api internal: remove unreasonable crate dependency 2021-08-22 14:05:12 +03:00
proc_macro_srv Copy the proc_macro crate for the 1.56 ABI 2021-08-07 16:34:59 +01:00
proc_macro_test cargo_metadata 0.14 2021-07-09 11:01:55 -04:00
profile internal: make non-zero times stand out in profile 2021-07-31 16:22:03 +03:00
project_model Reduce visibility of WorkspaceBuildScripts::run 2021-08-25 18:02:27 +02:00
rust-analyzer minor: nicer way to defeat disjoint closure captures 2021-08-26 22:13:50 +03:00
sourcegen minor: make sure that project_root works correctly 2021-07-13 15:02:29 +03:00
stdx Remove proc macro management thread 2021-07-08 16:43:39 +02:00
syntax Merge #9944 2021-08-24 13:11:50 +00:00
test_utils Refactor & improve handling of overloaded binary operators 2021-08-22 17:35:50 +02:00
text_edit Handle all rename special cases for all record pattern fields 2021-08-16 22:48:38 +02:00
toolchain minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
tt minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
vfs internal: document that ascription is preferred to a turbo fish 2021-08-11 14:16:15 +03:00
vfs-notify Bump notify version to 5.0.0-pre.12 2021-08-17 17:25:11 +02:00