Commit Graph

20188 Commits

Author SHA1 Message Date
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
Laurențiu Nicola
6300d03acd Bump d3 2021-12-05 13:38:31 +02:00
bors[bot]
1cf1359c55
Merge #10937
10937: fix: Add highlighting hack back for unresolved attributes r=Veykril a=Veykril

cc https://github.com/rust-analyzer/rust-analyzer/issues/10935
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-05 11:02:55 +00:00
Lukas Wirth
9b4ca77572 fix: Add highlighting hack back for unresolved attributes 2021-12-05 11:59:07 +01:00
bors[bot]
8a084e6aca
Merge #10902
10902: Handle multiple cargo check quick fix spans r=Veykril a=brandondong

Resolves https://github.com/rust-analyzer/rust-analyzer/issues/10705.

**Cause:**
- For a cargo check diagnostic with multiple spans, only a single quick fix action would be created at the location of `spans[0]`. Additionally, the hover window details would only show the location of `spans[0]` next to the message.

**Fix:**
- Allow cargo check quick fix actions to be triggerable from multiple selection ranges. Specifically, if the selection intersects with any of the replacement spans, the quick fix action is shown.
- No change in behavior for the hover window details. It's pretty minor and I think showing multiple locations next to the message may be more confusing anyways.

Co-authored-by: Brandon <brandondong604@hotmail.com>
2021-12-05 10:52:54 +00:00
Brandon
fa2818551e Update expected test results 2021-12-04 21:42:13 -08:00
Brandon
0d1910c6fb Handle multiple cargo check quick fix spans 2021-12-04 21:41:56 -08:00
Brandon
de05c3d406 Refactor away unnecessary Vec 2021-12-04 19:59:05 -08:00
bors[bot]
6434ada19e
Merge #10930
10930: fix: Fix self keyword not being tagged as such in highlighting properly r=Veykril a=Veykril

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

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-04 18:08:11 +00:00
Lukas Wirth
b35a50cb10 fix: Fix self keyword not being tagged as such in highlighting properly 2021-12-04 19:07:18 +01:00
bors[bot]
372a7cf981
Merge #10929
10929: internal: Split up macro/attribute semantic tokens a bit more r=Veykril a=Veykril

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

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-04 17:33:16 +00:00
Lukas Wirth
3472105ad9 Update semantic token docs 2021-12-04 18:23:25 +01:00
Lukas Wirth
e4f2d0e3a8 Introduce SymbolKind::Derive 2021-12-04 18:18:09 +01:00
Lukas Wirth
642c1eb720 Introduce SymbolKind::Attribute 2021-12-04 18:01:22 +01:00
bors[bot]
b327cf3d0c
Merge #10928
10928: minor: Bump deps r=lnicola a=lnicola



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-12-04 13:21:40 +00:00
Laurențiu Nicola
b7368d34a6 Bump pulldown-cmark-to-cmark 2021-12-04 15:21:04 +02:00
Laurențiu Nicola
076f2247f2 Bump miow 2021-12-04 15:17:30 +02:00
Laurențiu Nicola
f2a1082c84 Bump countme 2021-12-04 15:14:31 +02:00
Laurențiu Nicola
26aba38168 Bump chalk 2021-12-04 15:08:43 +02:00
Laurențiu Nicola
89a1256f9a Bump most deps 2021-12-04 15:08:37 +02:00
bors[bot]
f00e1c05c5
Merge #10927
10927: minor: bump the rest of the npm deps r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-12-04 12:37:19 +00:00
Laurențiu Nicola
341e3773c3 Bump rest of the npm deps 2021-12-04 14:28:48 +02:00
Laurențiu Nicola
29682445ac Bump node-fetch 2021-12-04 14:26:37 +02:00
Laurențiu Nicola
c3a97a9a9c Bump vsce 2021-12-04 14:26:14 +02:00
Laurențiu Nicola
98697b61b5 Bump eslint 2021-12-04 14:26:14 +02:00
Laurențiu Nicola
0cf031a18a Bump engine in lockfile 2021-12-04 14:26:14 +02:00
bors[bot]
71cbc79b0e
Merge #10925
10925: minor: Simplify `.vscodeignore` r=lnicola a=lnicola

The quadruple negation we used to have here was quite confusing:

```gitignore
**
!out
out/**
!out/src
```

Let's ignore everything and cherry-pick what we want to include.

~~And also include the extension sourcemap, just in case someone wants to debug the extension.~~

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-12-04 12:17:29 +00:00
Laurențiu Nicola
65cdced805 Simplify .vscodeignore 2021-12-04 14:16:10 +02:00
bors[bot]
0c6208a048
Merge #10924
10924: minor: Add LICENSE file to make vsce happy r=lnicola a=lnicola

Newer `vsce` versions error out if a `LICENSE` file is missing, even if the license is specified in `package.json`. Concatenate the two licenses we use and add a file with that to make a future `vsce` upgrade easier.

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-12-04 11:44:27 +00:00