rust/crates
bors 15ff8a5a9f Auto merge of #13715 - feniljain:fix_completions, r=jonas-schievink
fix: breaking snippets on typed incomplete suggestions

Possible fix for #7929

Fix the case where if a user types `&&42.o`, snippet completion was still applying &&Ok(42). Note this was fixed previously on `&&42.` but this still remained a problem for this case

Previous relevant PR: #13517

### Points to help in review:

- The main problem why everything broke on adding an extra `o` was, earlier `dot_receiver` was `42.` which was a `LITERAL` but now `42.o` becomes a `FIELD_EXPR`

- Till now `include_references` was just checking for parent of `LITERAL` and if it was a `REF_EXPR`, but now we consider `FIELD_EXPR` and traverse all of them, finally to reach `REF_EXPR`. If `REF_EXPR` is not found we  just return the original `initial_element`

- We are constructing a new node during `include_references` because if we rely on `dot_receiver` solely we would get `&&42.o` to be replaced with, but we want `&&42` to be replaced with

### Output Video:

https://user-images.githubusercontent.com/49019259/205420166-efbdef78-5b3a-4aef-ab4b-d892dac056a0.mov

Hope everything I wrote makes sense 😅

Also interestingly previous PR's number was `13517` and this PR's number is `13715`, nicee
2022-12-12 14:37:45 +00:00
..
base-db ⬆️ rust-analyzer 2022-11-23 17:24:03 +02:00
cfg ⬆️ rust-analyzer 2022-11-23 17:24:03 +02:00
flycheck Properly implement Drop for JodGroupChild 2022-11-24 21:30:15 +01:00
hir Make assoc_resolutions always have a Substitution 2022-12-10 17:05:33 +01:00
hir-def Auto merge of #13490 - HKalbasi:layout, r=jonas-schievink 2022-12-07 15:22:03 +00:00
hir-expand Compute data layout of types 2022-12-04 00:29:34 +03:30
hir-ty Make assoc_resolutions always have a Substitution 2022-12-10 17:05:33 +01:00
ide Auto merge of #13725 - bvanjoi:resolve-const-triat-impls, r=flodiebold 2022-12-10 13:58:28 +00:00
ide-assists Auto merge of #13726 - feniljain:fix_assists, r=jonas-schievink 2022-12-12 14:06:45 +00:00
ide-completion Auto merge of #13715 - feniljain:fix_completions, r=jonas-schievink 2022-12-12 14:37:45 +00:00
ide-db Encode the variants of HirFileId in a u32 with MSB as the tag 2022-11-25 23:28:35 +01:00
ide-diagnostics ⬆️ rust-analyzer 2022-11-23 17:24:03 +02:00
ide-ssr ⬆️ rust-analyzer 2022-11-23 17:24:03 +02:00
limit ⬆️ rust-analyzer 2022-11-23 17:24:03 +02:00
mbe ⬆️ rust-analyzer 2022-11-23 17:24:03 +02:00
parser Fix parsing of _ = x in closure body 2022-12-12 12:57:29 +01:00
paths ⬆️ rust-analyzer 2022-11-23 17:24:03 +02:00
proc-macro-api ⬆️ rust-analyzer 2022-11-23 17:24:03 +02:00
proc-macro-srv Handle raw identifiers in proc macro server 2022-12-04 00:26:05 +09:00
proc-macro-srv-cli ⬆️ rust-analyzer 2022-11-23 17:24:03 +02:00
proc-macro-test ⬆️ rust-analyzer 2022-11-23 17:24:03 +02:00
profile ⬆️ rust-analyzer 2022-11-23 17:24:03 +02:00
project-model Auto merge of #13667 - Veykril:detached-files-sysroot, r=Veykril 2022-11-24 09:21:44 +00:00
rust-analyzer Version the inlay hint resolve data 2022-11-29 19:20:32 +01:00
sourcegen ⬆️ rust-analyzer 2022-11-23 17:24:03 +02:00
stdx ⬆️ rust-analyzer 2022-11-23 17:24:03 +02:00
syntax Move precedence handling to crates/syntax 2022-12-08 18:46:30 +00:00
test-utils Auto merge of #13490 - HKalbasi:layout, r=jonas-schievink 2022-12-07 15:22:03 +00:00
text-edit ⬆️ rust-analyzer 2022-11-23 17:24:03 +02:00
toolchain ⬆️ rust-analyzer 2022-11-23 17:24:03 +02:00
tt Handle raw identifiers in proc macro server 2022-12-04 00:26:05 +09:00
vfs ⬆️ rust-analyzer 2022-11-23 17:24:03 +02:00
vfs-notify ⬆️ rust-analyzer 2022-11-23 17:24:03 +02:00