Commit Graph

27982 Commits

Author SHA1 Message Date
bors
b94c2852fa Auto merge of #16856 - Veykril:macarons, r=Veykril
fix: Fix wrong where clause rendering on hover

We were not accounting for proper newline indentation in some places making the hover look weird (or just straight up wrong for type aliases)
2024-03-16 17:23:02 +00:00
Lukas Wirth
d69a81fddb fix: Fix wrong where clause rendering on hover 2024-03-16 17:49:59 +01:00
bors
c8badeb82b Auto merge of #16854 - rust-lang:dependabot/npm_and_yarn/editors/code/follow-redirects-1.15.6, r=lnicola
Bump follow-redirects from 1.15.4 to 1.15.6 in /editors/code

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6.
<details>
<summary>Commits</summary>
<ul>
<li><a href="35a517c586"><code>35a517c</code></a> Release version 1.15.6 of the npm package.</li>
<li><a href="c4f847f851"><code>c4f847f</code></a> Drop Proxy-Authorization across hosts.</li>
<li><a href="8526b4a1b2"><code>8526b4a</code></a> Use GitHub for disclosure.</li>
<li><a href="b1677ce001"><code>b1677ce</code></a> Release version 1.15.5 of the npm package.</li>
<li><a href="d8914f7982"><code>d8914f7</code></a> Preserve fragment in responseUrl.</li>
<li>See full diff in <a href="https://github.com/follow-redirects/follow-redirects/compare/v1.15.4...v1.15.6">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=follow-redirects&package-manager=npm_and_yarn&previous-version=1.15.4&new-version=1.15.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/rust-lang/rust-analyzer/network/alerts).

</details>
2024-03-16 07:05:14 +00:00
dependabot[bot]
64c12e665b
Bump follow-redirects from 1.15.4 to 1.15.6 in /editors/code
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.4...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-16 06:57:29 +00:00
bors
ee03bd0581 Auto merge of #16851 - lnicola:ubuntu-20.04, r=lnicola
internal: Build releases on Ubuntu 20.04

Closes #16793
2024-03-16 06:45:16 +00:00
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
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
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
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
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
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
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
Wyatt Herkamp
0fb5d0d918 Check for cfg_attr on the actual item and Debug instead of info in cfg_process 2024-03-11 06:55:04 -04:00
bors
a0dd822972 Auto merge of #16473 - SomeoneToIgnore:kb/remove-resolve-stub, r=Veykril
Stop eagerly resolving inlay hint text edits for VSCode

Send less json over the wire.
After https://github.com/microsoft/vscode/issues/193124 was fixed, this change is not needed anymore.

VSCode 1.86.0 now supports double click for unresolved hint data too.
2024-03-11 09:44:02 +00:00
bors
a58f574816 Auto merge of #16762 - wyatt-herkamp:master, r=Veykril
Added QuickFix for unresolved field.

Adds an AssistKind::QuickFix for unresolved field.

Currently, Snippets are not available for Diagnostics. So the type defaults to the Unit type if the type is not able to be inferred.

https://github.com/rust-lang/rust-analyzer/assets/11785959/bd4c67bd-f8cb-4254-9a87-641ae80a7a28

Closes https://github.com/rust-lang/rust-analyzer/issues/4563
2024-03-11 09:31:22 +00:00
Lukas Wirth
0dbaccd484 Track vscode version for conditional bug server sided bugfixes 2024-03-11 10:31:06 +01:00
Kirill Bulatov
57a0ad4343 Stop eagerly resolving inlay hint text edits for VSCode
After https://github.com/microsoft/vscode/issues/193124 was fixed,
this change is not needed anymore.
2024-03-11 10:22:02 +01:00
bors
a5035f4931 Auto merge of #16749 - Veykril:on-demand-validation-err, r=Veykril
internal: Some method resolution cleanups
2024-03-11 09:18:24 +00:00
bors
1069f57d8b Auto merge of #16784 - Veykril:body-invalid, r=Veykril
internal: Remove synstructure const hack support

The latest version of it no longer emits these
2024-03-11 09:05:26 +00:00
Lukas Wirth
c679482d7e Add method resolution deref inference var test 2024-03-11 10:02:03 +01:00