Commit Graph

20216 Commits

Author SHA1 Message Date
bors[bot]
3137327182
Merge #10985
10985: minor: Remove unnecessary clones r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-11 14:32:29 +00:00
Lukas Wirth
03f6d92ae4 minor: Remove unnecessary clones 2021-12-11 15:27:36 +01:00
bors[bot]
d97f2f6b9b
Merge #10976
10976: fix: Show case-insensitive exact matches instead of fuzzy flyimport for short paths r=Veykril a=Veykril

And raise the fuzzy trigger from 2 to 3 chars. This way we keep the ability of flyimporting short names like `Rc`.
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/6917
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-11 13:50:55 +00:00
Lukas Wirth
143a30aa51 Show case-insensitive exact matches instead of fuzzy flyimport for short paths 2021-12-11 14:47:11 +01:00
bors[bot]
d03397fe11
Merge #10978
10978: internal: Only prime direct dependencies of the workspace crates r=jonas-schievink a=lnicola

This reduces the number of primed crates on `self` from 177 to 105.

```text
# baseline
  86521 me   20   0 2939M  562M 14320 S  0.0  0.9  0:07.10   37 rust-analyzer

# pr
  99947 me   20   0 2935M  549M 14424 S  0.0  0.9  0:07.10   37 rust-analyzer
```

The RAM usage seems to vary a lot, so I'm not sure the improvement shown above is real.

We also drop the topological sorting, although it might still make sense to do the dependencies before the workspace crates. But since it's only used to make the progress reporting a bit more fine, it probably doesn't matter too much.

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-12-10 22:31:55 +00:00
bors[bot]
021d5821be
Merge #10981
10981: internal: Remove some allocations r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-10 19:02:51 +00:00
Lukas Wirth
1bbc255ec5 Remove some allocations 2021-12-10 20:01:24 +01:00
bors[bot]
bcc720f22f
Merge #10979
10979: fix: Don't show trait flyimports for impl trait and placeholders r=Veykril a=Veykril

cc #8539
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-10 18:19:02 +00:00
Lukas Wirth
c81aa68afe Don't show trait flyimports for impl trait and placeholders 2021-12-10 19:18:21 +01:00
Lukas Wirth
a7fc2061ea Show enum completions for single variant enums in irrefutable patterns 2021-12-10 18:25:54 +01:00
Laurențiu Nicola
d012a20f25 Only prime direct dependencies of the workspace crates 2021-12-10 16:24:07 +02:00
bors[bot]
bc8efca0c8
Merge #10977
10977: fix: fix `concat!` with captured expression r=jonas-schievink a=jonas-schievink

Adds another hack on top of https://github.com/rust-analyzer/rust-analyzer/pull/10623 to fix `concat!`.

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

bors r+

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2021-12-10 14:19:51 +00:00
Jonas Schievink
95ddeaed8e Fix concat! with captured expression 2021-12-10 15:17:31 +01:00
bors[bot]
2534b7db1a
Merge #10975
10975: internal: Shrink TraitImpls and InherentImpls HashMaps r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-09 17:41:01 +00:00
Lukas Wirth
c469f8abcb internal: Shrink TraitImpls and InherentImpls HashMaps 2021-12-09 18:39:46 +01:00
bors[bot]
9eb5a96387
Merge #10974
10974: minor: Simplify r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-09 17:28:53 +00:00
Lukas Wirth
e1a236d65e Simplify 2021-12-09 18:28:10 +01:00
Lukas Wirth
f9c59d3752 Use known names instead of string literals 2021-12-09 18:13:15 +01:00
Lukas Wirth
067d87e8a9 Remove some allocs 2021-12-09 18:04:32 +01:00
bors[bot]
6df9bd42f4
Merge #10972
10972: minor: Bump vscode to 1.62 r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-12-09 15:18:41 +00:00
Laurențiu Nicola
19c774b4c4 Bump eslint 2021-12-09 17:16:30 +02:00
Laurențiu Nicola
c1fc774b6e Bump vscode 2021-12-09 17:15:21 +02:00
bors[bot]
020242ff0e
Merge #10966
10966: fix: Fix library target overriding sysroot deps r=jonas-schievink a=jonas-schievink

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

bors r+

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2021-12-08 16:12:37 +00:00
Jonas Schievink
58ce331baa Fix library target overriding sysroot deps 2021-12-08 17:05:00 +01:00
bors[bot]
86ba54c060
Merge #10964
10964: minor: Move synstructure hack out of ItemTree lowering r=jonas-schievink a=jonas-schievink

Don't set the name to `None` for the rest of the IDE if it's generated by synstructure.

bors r+

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2021-12-08 14:46:13 +00:00
Jonas Schievink
c0a30ff21d Move synstructure hack out of ItemTree lowering 2021-12-08 15:44:52 +01:00
bors[bot]
77f2d34930
Merge #10950
10950: internal: completion: split out more PathKinds from ImmediateLocation r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-07 21:57:59 +00:00
Lukas Wirth
ae0c7268f7 internal: completion: split out more PathKinds from ImmediateLocation 2021-12-07 22:49:42 +01:00
bors[bot]
755b668ae4
Merge #10960
10960: fix: fix handling of macros in `extern` blocks r=jonas-schievink a=jonas-schievink

- Removes knowledge of what's in an extern block from `ItemTree`.
- Treats extern blocks as `AssocContainerId` and renames the latter to `ItemContainerId`.
- Threads the container through name resolution (which is a bit messy).
- Considers statics to be associated items, since they can be in an extern block. (it might be better to further distinguish potentially-associated-items from potentially-in-an-extern-block-items, but currently I don't expect much of a benefit)
- Adds a test for the incorrect-case diagnostic demonstrating the impact of this change.

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

bors r+

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2021-12-07 16:52:21 +00:00
Jonas Schievink
b365b6119c Treat extern blocks as item containers 2021-12-07 17:31:26 +01:00
bors[bot]
b7afb6fc6c
Merge #10958
10958: internal: add "Shuffle Crate Graph" command r=jonas-schievink a=jonas-schievink

May be useful for debugging issues like https://github.com/rust-analyzer/rust-analyzer/issues/10084

bors r+

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2021-12-07 15:44:05 +00:00
Jonas Schievink
0db5aacfcd Update lsp-extensions.md 2021-12-07 16:41:24 +01:00
Jonas Schievink
deb5c1426d internal: add "Shuffle Crate Graph" command 2021-12-07 16:37:19 +01:00
bors[bot]
bf484d9d99 Merge #10957
10957: fix: Fix some TryToNav impls not upmapping ranges out of macros r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-07 14:51:07 +00:00
Lukas Wirth
f781e599cc Adjust incorrect runnable tests 2021-12-07 15:42:54 +01:00
Lukas Wirth
e09d410dcd Simplify 2021-12-07 15:06:56 +01:00
Lukas Wirth
b66f181bc0 Fix some TryToNav impls not upmapping ranges out of macros 2021-12-07 15:02:22 +01:00
bors[bot]
9ae3158292
Merge #10953
10953: minor: Bump `tracing` r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-12-06 19:26:51 +00:00
Laurențiu Nicola
3678cbd12e Bump tracing 2021-12-06 20:54:45 +02:00
bors[bot]
49b0970970
Merge #10949
10949: Bump parser step limit a little r=lnicola a=lnicola

Fixes #10948

This doesn't actually make the limit configurable, but at least uses the same `Limit` struct, so we can fix all of them at once when we get to it.

We also bump the limit from 10 to 15M, which is a small enough increase to not worry about making the experience worse for non-`windows` users. We still crash when we reach the limit.

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-12-06 09:50:49 +00:00
Laurențiu Nicola
f5db6e0e95 Bump parser step limit a little 2021-12-06 11:47:36 +02:00
bors[bot]
7d6fcbc0be
Merge #10944
10944: internal: Prefer resolution of inert attributes r=Veykril a=Veykril

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10942
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-05 15:28:28 +00:00
Lukas Wirth
89e1d19ec5 internal: Prefer resolution of inert attributes 2021-12-05 16:28:08 +01:00
bors[bot]
6f84bbfa1e
Merge #10943
10943: feat: Enable completions for attributes r=Veykril a=Veykril



Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-05 15:14:10 +00:00
Lukas Wirth
1f254dd855 feat: Enable flyimport completions for attributes 2021-12-05 15:57:28 +01:00
bors[bot]
b519a179b4
Merge #10940
10940: minor: Fix HttpsProxyAgent creation and avoid deprecated call r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-12-05 12:12:44 +00:00
Laurențiu Nicola
725b3fdd65 Fix HttpsProxyAgent creation and avoid deprecated call 2021-12-05 14:11:49 +02:00
bors[bot]
5c0e2b229c
Merge #10939
10939: minor: Clean up some unused cross-crate dependencies r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-12-05 11:55:36 +00:00
Laurențiu Nicola
bff377c712 Clean up some unused cross-crate dependencies 2021-12-05 13:54:49 +02:00
bors[bot]
396f864134
Merge #10938
10938: minor: Bump d3 r=lnicola a=lnicola



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-12-05 11:40:23 +00:00