rust/crates
Pascal Kuthe 2e465d18f2
generate correct completion edits for missing macro arguments
rust-analyzer used the token at the cursor after macro expansion
to decide whether to replace the token at the cursor before macro
expansion. In most cases these two are the same but in some cases these
can mismatch which can lead to incorrect replacements.

For example if an ident/expr macro argument is missing rust-analyzer
generates a "missing" identifier as a placeholder, there is only a
brace at the cursor. Therefore, rust-analyzer will incorrectly replace
the macro brace with the completion in that case leading to #14246.

Using the expanded token type was intentional. However, this doesn't
seem to ever be desirable (this is supported by the fact that there
were no tests that relied on this behavior) since the type of edit to
perform should always be determined by the token it's actually applied
to.
2023-03-04 02:05:09 +01:00
..
base-db ⬆️ rust-analyzer 2023-02-13 13:55:14 +02:00
cfg ⬆️ rust-analyzer 2023-02-13 13:55:14 +02:00
flycheck Deduplicate source roots that have overlapping include paths 2023-02-28 12:08:23 +01:00
hir Disable pattern type mismatches again 2023-03-03 22:41:41 +01:00
hir-def Auto merge of #14184 - lowr:feat/trait-alias-def, r=Veykril 2023-03-03 15:45:18 +00:00
hir-expand Show pattern mismatch diagnostics 2023-03-03 10:41:44 +01:00
hir-ty Diagnose unresolved method calls 2023-03-03 20:43:13 +01:00
ide Auto merge of #14184 - lowr:feat/trait-alias-def, r=Veykril 2023-03-03 15:45:18 +00:00
ide-assists Auto merge of #14184 - lowr:feat/trait-alias-def, r=Veykril 2023-03-03 15:45:18 +00:00
ide-completion generate correct completion edits for missing macro arguments 2023-03-04 02:05:09 +01:00
ide-db Diagnose unresolved method calls 2023-03-03 20:43:13 +01:00
ide-diagnostics Disable pattern type mismatches again 2023-03-03 22:41:41 +01:00
ide-ssr ⬆️ rust-analyzer 2023-02-13 13:55:14 +02:00
intern ⬆️ rust-analyzer 2023-02-13 13:55:14 +02:00
limit ⬆️ rust-analyzer 2023-02-13 13:55:14 +02:00
mbe internal: Enable smallvec's union feature 2023-02-14 17:01:01 +01:00
parser Parse trait alias as a distinct AST type 2023-03-04 00:23:56 +09:00
paths ⬆️ rust-analyzer 2023-02-13 13:55:14 +02:00
proc-macro-api Cargo fmt 2023-02-14 14:45:05 -05:00
proc-macro-srv ⬆️ rust-analyzer 2023-02-13 13:55:14 +02:00
proc-macro-srv-cli ⬆️ rust-analyzer 2023-02-13 13:55:14 +02:00
proc-macro-test ⬆️ rust-analyzer 2023-02-13 13:55:14 +02:00
profile ⬆️ rust-analyzer 2023-02-13 13:55:14 +02:00
project-model Don't drop rustc crates in the rustc workspace 2023-03-02 12:55:41 +01:00
rust-analyzer Auto merge of #14184 - lowr:feat/trait-alias-def, r=Veykril 2023-03-03 15:45:18 +00:00
sourcegen ⬆️ rust-analyzer 2023-02-13 13:55:14 +02:00
stdx Fix a pair of typos 2023-02-15 14:11:11 +02:00
syntax refactor: leverage HasAttrs for code brevity 2023-03-04 00:24:03 +09:00
test-utils beginning of MIR 2023-02-27 23:45:54 +03:30
text-edit ⬆️ rust-analyzer 2023-02-13 13:55:14 +02:00
toolchain Respect $CARGO_HOME when looking up toolchains. 2023-02-26 15:37:04 +09:00
tt ⬆️ rust-analyzer 2023-02-13 13:55:14 +02:00
vfs ⬆️ rust-analyzer 2023-02-13 13:55:14 +02:00
vfs-notify ⬆️ rust-analyzer 2023-02-13 13:55:14 +02:00