Commit graph

28190 commits

Author SHA1 Message Date
Laurențiu Nicola
bf89762204 Build releases on Ubuntu 20.04 2024-03-15 18:16:11 +02:00
bors
d7ec7a5441 Auto merge of #16847 - HKalbasi:test-explorer, r=HKalbasi
Distinguish integration tests from crates in test explorer

Fix part of #16827
2024-03-15 14:25:53 +00:00
hkalbasi
dcfc9ccace Distinguish integration tests from crates in test explorer 2024-03-15 17:16:28 +03:30
bors
f9a4d05195 Auto merge of #16845 - HKalbasi:test-explorer, r=HKalbasi
Show compilation progress in test explorer

Fix part of #16827
2024-03-15 13:15:35 +00:00
roife
10aa999c74 fix: typo 2024-03-15 21:14:17 +08:00
roife
d40c0fe48b test: add test for extract_module 2024-03-15 21:05:04 +08:00
roife
513c6d35ed fix: re-insert use stmts that is extracted 2024-03-15 21:04:51 +08:00
hkalbasi
eeff20d172 Show compilation progress in test explorer 2024-03-15 16:28:59 +03:30
bors
d763e05182 Auto merge of #16844 - Veykril:macarons, r=Veykril
internal: Replace `Span` with `SyntaxContextId` in `MacroCallLoc`

This makes these a lot more stable again
2024-03-15 12:32:06 +00:00
Lukas Wirth
0dd89d7ee7 Remove usages of SpanData where Span suffices 2024-03-15 13:02:40 +01:00
roife
de716058c9 fix: remove useless loop 2024-03-15 19:54:58 +08:00
Lukas Wirth
b59c8c76db Repalce Span with SyntaxContextId in MacroCallLoc 2024-03-15 12:47:05 +01:00
Lukas Wirth
08327e0e5d Drop eager macro parse errors, they can't crop up 2024-03-15 11:45:51 +01:00
bors
9029c51ae4 Auto merge of #16842 - Veykril:macarons, r=Veykril
internal: Make def site span for proc-macro more invalidation resistant
2024-03-15 09:17:06 +00:00
Lukas Wirth
3b1ad2379d internal: Make def site span for proc-macro more invalidation resistant 2024-03-15 10:14:00 +01:00
bors
a9a26c115f Auto merge of #16841 - Veykril:macarons, r=Veykril
internal: Use assoc items as anchors for spans

This reduces the amount of macro call invalidations a bit
2024-03-15 08:32:31 +00:00
Lukas Wirth
c50c4f8bbb internal: Use assoc items as anchors for spans 2024-03-15 09:28:39 +01:00
roife
5b2809f329 fix: simplification on extract_module 2024-03-15 14:24:16 +08:00
Wilfred Hughes
4422a90b11 refactor: Store the CLI command directly in RustTargetDefinition 2024-03-14 16:41:49 -07:00
Wilfred Hughes
2e109c7da8 refactor: Use a single CLI args array rather than a separate subcommand field 2024-03-14 16:41:49 -07:00
Wilfred Hughes
d472fd932b refactor: Rename CargoTask to RustTask in extension 2024-03-14 16:41:49 -07:00
bors
14558af15e Auto merge of #16834 - Veykril:macarons, r=Veykril
feat: Support macro calls in eager macros for IDE features

Basically hovering `concat` and `env` in `include!(concat!(env!("OUT_DIR"), "/foo.rs"))` now works and highlights as expected.

This also fixes a few bugs/problems to make it work. Prior we set the call site span to the entire macro call which is kind of wrong, typing inside the call would invalidate the span causing us to leak `MacroCallLoc`s whenever that happened. The same happened for attributes both of which now define their path as the call site.
2024-03-14 15:34:53 +00:00
Lukas Wirth
d085ade631 Remove dead test code 2024-03-14 16:24:51 +01:00
Lukas Wirth
d2f8eae2ec feat: Support macro calls in eager macros for IDE features 2024-03-14 15:40:35 +01:00
roife
6248b45340 fix: do not add use stmt when use stmt is selected in extract_module 2024-03-14 19:50:36 +08:00
roife
02214a6d12 fix: remove redundant use node insertion 2024-03-14 19:37:52 +08:00
bors
6fc3a3ef05 Auto merge of #16832 - Veykril:macarons, r=Veykril
internal: Shrink MacroCallLoc

Shaves off 4/8 bytes
2024-03-14 07:56:26 +00:00
roife
418056597b fix: donot generate redundant use stmt for items in selection in extract_module 2024-03-14 15:18:31 +08:00
roife
9c8a57ed08 fix: simplify extract_module 2024-03-14 15:04:17 +08:00
Lukas Wirth
9767156a29 Simplify 2024-03-13 20:02:21 +01:00
Lukas Wirth
abe3177445 Shrink MacroCallLoc 2024-03-13 18:05:27 +01:00
Jesse Bakker
95828850b2 Fix panic with impl trait associated types in where clause 2024-03-13 18:02:15 +01:00
Lukas Wirth
87e0bbc534 Stronger typing for macro_arg query 2024-03-13 17:42:01 +01:00
bors
e8182a5bb3 Auto merge of #16824 - Wilfred:size_whitespace, r=lnicola
minor: Fix unwanted leading whitespace in hover text

PR #16366 moved layout information to a separate line, so the leading whitespace is no longer necessary.
2024-03-13 08:47:10 +00:00
Wilfred Hughes
30d3d68044 Fix unwanted leading whitespace in hover text
PR #16366 moved layout information to a separate line, so the
leading whitespace is no longer necessary.
2024-03-12 12:27:57 -07:00
bors
a2e274142f Auto merge of #16819 - Veykril:span-upmapping, r=Veykril
internal: Improve rooted upmapping

cc https://github.com/rust-lang/rust-analyzer/issues/16235
2024-03-12 12:58:52 +00:00
Lukas Wirth
9ba4493918 internal: Improve rooted upmapping 2024-03-12 13:46:58 +01:00
bors
9bc1eb49b5 Auto merge of #16820 - lnicola:no-string-comment-autoclose, r=lnicola
fix: Don't auto-close block comments in strings

Fixes #16815
2024-03-12 12:46:17 +00:00
Laurențiu Nicola
cb6c26ba82 Don't auto-close block comments in strings 2024-03-12 14:44:35 +02:00
bors
d3e6fea315 Auto merge of #16789 - wyatt-herkamp:cfg_attr, r=Veykril
cfg Attribute Stripping for Proc Macro Expansion

This will attempt to process cfg attributes and cfg_attr attributes for proc macro expansion.
![image](https://github.com/rust-lang/rust-analyzer/assets/11785959/b85ef203-14a5-44c9-9b67-59a65a5f2d96)

Closes #8434 , #11657, and #13904
2024-03-12 10:19:19 +00:00
Wyatt Herkamp
447de3d788 Review Updates and added tests. 2024-03-11 11:05:59 -04:00
bors
03d2d9016d Auto merge of #16811 - Veykril:snapshot, r=Veykril
fix: Fix method resolution snapshotting receiver_ty too early

Accidental change in https://github.com/rust-lang/rust-analyzer/pull/16749 presumably caused some type mismatches in webrender
2024-03-11 14:37:32 +00:00
Lukas Wirth
fdc527f096 fix: Fix method resolution snapshotting receiver_ty too early 2024-03-11 15:35:06 +01:00
bors
8f8bcfc131 Auto merge of #16335 - lnicola:salsa-lz4-file-text, r=Veykril
internal: Compress file text using LZ4

I haven't tested properly, but this roughly looks like:

```
1246 MB
    59mb   4899 FileTextQuery

1008 MB
    20mb   4899 CompressedFileTextQuery
   555kb   1790 FileTextQuery
```

We might want to test on something more interesting, like `bevy`.
2024-03-11 13:43:33 +00:00
bors
2f872156fe Auto merge of #16808 - ShoyuVanilla:proc-macro-sem-token, r=Veykril
feat: Add proc macro semantic token type

Closes  #11529
2024-03-11 13:20:29 +00:00
Shoyu Vanilla
fc11216ad5 feat: Add proc macro semantic token type 2024-03-11 22:14:59 +09:00
bors
40ee359046 Auto merge of #16810 - Young-Flash:unused_var_fix, r=Veykril
feat: add fix for unused_variables

add a leading underscore for unused variable
2024-03-11 13:01:50 +00:00
bors
2320e12541 Auto merge of #16771 - Veykril:self-param-split, r=Veykril
internal: Don't desugar self param into a pattern

Small experiment to see if this simplifies things
2024-03-11 12:45:46 +00:00
Young-Flash
562f4a2688 test: update test for unused_variables 2024-03-11 19:36:53 +08:00
Young-Flash
77136575da feat: add fix for unused_variables 2024-03-11 19:36:53 +08:00