Commit graph

262157 commits

Author SHA1 Message Date
Vincent Esche
08d3d44c7d Apply Veykril's change suggestions 2024-08-06 00:25:02 +02:00
Vincent Esche
ccc4177911 Replace "ra_ap_ide" with "ide (aka ra_ap_ide)" 2024-08-06 00:25:02 +02:00
Vincent Esche
54e68e6adf Fix spelling of "data structure" 2024-08-06 00:25:02 +02:00
Vincent Esche
cc67602501 Fix spelling of "object-oriented" 2024-08-06 00:25:02 +02:00
Vincent Esche
a22691afd9 Fix obsolete repository URL in [package.repository] of rust-analyzer crate 2024-08-06 00:25:02 +02:00
Vincent Esche
163534182d Add repository URL for published crates' missing [package.repository] fields 2024-08-06 00:25:02 +02:00
Vincent Esche
88ea306270 Replace "TBD" with more helpful desciptions in published crates' [package.description] fields 2024-08-06 00:25:02 +02:00
bors
37f75693a1 Auto merge of #17802 - Veykril:arg-mismatch-no-ty-mismatch, r=Veykril
fix: Surpress type mismatches in calls with mismatched arg counts

These tend to get very noisy, hiding the actual problem.
2024-08-05 14:35:50 +00:00
bors
64cd3da35d Auto merge of #17772 - Veykril:debug.ts, r=Veykril
internal: Reorganize debug.ts
2024-08-05 14:21:45 +00:00
Lukas Wirth
3e23c4541b Surpress type mismatches in calls with mismatched arg counts 2024-08-05 16:15:28 +02:00
bors
7dd258a36d Auto merge of #17771 - Veykril:parallel-vfs-config, r=Veykril
internal: Load VFS config changes in parallel

Simple attempt to make some progress f or https://github.com/rust-lang/rust-analyzer/issues/17373
No clue if those atomic orderings are right, though I don't think they are really too relevant either.

A more complete fix would probably need to replace our `ProjectFolders` handling a bit.
2024-08-05 14:07:22 +00:00
Lukas Wirth
d95a4b8d2b Reorganize debug.ts 2024-08-05 16:06:25 +02:00
Lukas Wirth
314f30167f Slightly optimize watch list in vfs 2024-08-05 15:56:23 +02:00
bors
81cbc78096 Auto merge of #17791 - ShoyuVanilla:await-outside-of-async, r=Veykril
feat: Implement diagnostic for `await` outside of `async`

Closes #17781
2024-08-05 13:53:21 +00:00
bors
22f7c0802f Auto merge of #17775 - ShoyuVanilla:segregate-diags, r=Veykril
perf: Segregate syntax and semantic diagnostics

Closes #17731
2024-08-05 13:39:30 +00:00
Shoyu Vanilla
80c8786408 perf: Segregate syntax and semantic diagnostics 2024-08-05 22:12:47 +09:00
bors
56a7922377 Auto merge of #17801 - Veykril:unbrick-metrics, r=Veykril
minor: Fix metrics not running

`@bors` r+
2024-08-05 13:01:07 +00:00
Lukas Wirth
92a07b8b9c minor: Fix metrics not running 2024-08-05 14:59:27 +02:00
Shoyu Vanilla
3e809f8f1f feat: Implement diagnostic for await outside of async 2024-08-05 21:47:57 +09:00
bors
9d99d39eaf Auto merge of #17799 - Veykril:syntax-bridge, r=Veykril
Split out syntax-bridge into a separate crate

This functionality is not really tied to mbe macros, so imo it has no place in that crate.
2024-08-05 12:31:45 +00:00
bors
56fe166028 Auto merge of #17793 - jjoeldaniel:msvc-docs, r=Veykril
docs: add msvc note to manual

Added note for Windows users to have the latest MSVC to minimize setup issues.

Closes #4870
2024-08-05 12:17:25 +00:00
bors
78dea2465c Auto merge of #17784 - Young-Flash:block_with_label, r=Veykril
feat: support inlay hint for more expr with label

follow up https://github.com/rust-lang/rust-analyzer/pull/17635
2024-08-05 12:03:18 +00:00
Lukas Wirth
f12aca95e4
Simplify 2024-08-05 13:58:01 +02:00
bors
6825324763 Auto merge of #17794 - Veykril:source-db-simplify, r=Veykril
internal: Newtype `ErasedFileAstId`

It wrapping `la_arena::Idx` makes it quite annoying to use
2024-08-05 11:48:00 +00:00
Lukas Wirth
cdee65f5ea Newtype ErasedFileAstId 2024-08-05 13:46:47 +02:00
Lukas Wirth
90803b16c1 Split out syntax-bridge into a separate crate 2024-08-05 13:45:00 +02:00
Lukas Wirth
2e7db9c69f Simplify FileDelegate 2024-08-05 13:03:03 +02:00
bors
d84b970e60 Auto merge of #17795 - Veykril:library-dep-loading, r=Veykril
feat: Load sysroot library via cargo metadata

See https://github.com/rust-lang/rust/pull/128534, fixes https://github.com/rust-lang/rust-analyzer/issues/7637

Requires a toolchain from 176e54520 2024-08-04 or later to work.
2024-08-05 10:45:47 +00:00
Lukas Wirth
ef7d2c5d65 feat: Load sysroot library via cargo metadata 2024-08-05 12:18:19 +02:00
Joel Daniel Rico
b6b4e1a9c5 add msvc note to manual 2024-08-05 00:59:05 -07:00
bors
77fe1cb96c Auto merge of #17789 - ShoyuVanilla:issue-17191, r=Veykril
fix: Insert a generic arg for `impl Trait` when lowering generic args

Fixes #17191

We are not inserting a generic arg when lowering generics like
```rust
fn foo<T: B<impl A>(..) { ... }
```
but when we are lowering predicates we do;

aa00ddcf65/crates/hir-ty/src/lower.rs (L1697-L1718)
aa00ddcf65/crates/hir-ty/src/lower.rs (L310)

and this mismatch causes index out of bound panic while substituting the predicates
2024-08-04 19:13:40 +00:00
Shoyu Vanilla
fbe7233c0a fix: Insert a generic arg for impl Trait when lowering generic args 2024-08-05 00:06:29 +09:00
Young-Flash
a95ff26fdc test: add test case for inlay hint support for expr with label 2024-08-04 19:19:15 +08:00
Lukas Wirth
2d8a4949e9 Wait with change processing until the vfs is done 2024-08-02 17:09:25 +02:00
Lukas Wirth
07e6f9d918 internal: Load VFS config changes in parallel 2024-08-02 13:04:15 +02:00
bors
6da26c1558 Auto merge of #17770 - Veykril:path-try-from, r=Veykril
internal: Remove AbsPathBuf::TryFrom impl that checks too many things at once

https://github.com/rust-lang/rust-analyzer/pull/16889#discussion_r1590993282
2024-08-02 09:09:53 +00:00
Lukas Wirth
5ac2ad4eaf internal: Remove AbsPathBuf::TryFrom impl that checks too many things at once 2024-08-02 11:08:19 +02:00
bors
d646f7b258 Auto merge of #17705 - huntc:resolve-ra, r=Veykril
feat: Use oldest rustup rust-analyzer when toolchain override is present

Selects a rust-toolchain declared RA based on its date. The earliest (oldest) RA wins and becomes the one that the workspace uses as a whole.

In terms of precedence:

nightly > stable-with-version > stable

With stable-with-version, we invoke the RA with a `--version` arg and attempt to extract a date. Given the same date as a nightly, the nightly RA will win.

Fixes #17663
2024-08-02 06:50:43 +00:00
bors
61ebcf631b Auto merge of #17763 - ShoyuVanilla:wrap-unit, r=Veykril
fix: Insert a tail `Ok(())` for expr block instead of wrapping with `Ok`

Fixes #17728

When type mismatch is `Result<(), E>, ()` or `Option<()>, ()` and target expr is a block expression, it is more reasonable to insert a wrapped unit - `Ok(())` or `Some(())` - as the tail expression of that block than wrapping the entire block with `Ok` or `Some`
2024-08-01 14:16:08 +00:00
Young-Flash
cce9da3bef feat: support inlay hint for more expr with label 2024-08-01 22:06:15 +08:00
Shoyu Vanilla
44f5392f5a fix: Insert a tail Ok(()) for expr block instead of wrapping with Ok 2024-08-01 21:24:28 +09:00
bors
9ec4844925 Auto merge of #17761 - RalfJung:josh-roudntrip-error, r=lnicola
when josh-proxy screws up the roundtrip, say what the involved commits are

Helps debugging https://github.com/rust-lang/rust-analyzer/issues/17733
2024-08-01 10:38:36 +00:00
Ralf Jung
70805f9a6b when josh-proxy screws up the roundtrip, say what the involved commits are 2024-08-01 12:28:02 +02:00
bors
bf5844ea2d Auto merge of #17756 - Wilfred:fix_adoc_json, r=Veykril
docs: Fix JSON example for rust-analyzer.workspace.discoverConfig

The user does not specify `{arg}` in their JSON, and be pedantic about commas in JSON sample.
2024-08-01 08:15:44 +00:00
Wilfred Hughes
1df27d84a1 docs: Fix JSON example for rust-analyzer.workspace.discoverConfig
The user does not specify `{arg}` in their JSON, and be pedantic about
commas in JSON sample.
2024-07-31 16:10:42 -07:00
bors
e12408bf11 Auto merge of #17755 - ShoyuVanilla:issue-17738, r=davidbarsky
fix: Apply `IndexMut` obligations for non-assigning mutable index usages

Fixes #17738

Currently, we are pushing `IndexMut` obligations only for assign usages;
f982f3fa2c/crates/hir-ty/src/infer/expr.rs (L809-L817)
2024-07-31 18:06:53 +00:00
Shoyu Vanilla
086065e56b Prevent redundant obigation push for assignee exprs 2024-08-01 02:51:33 +09:00
Shoyu Vanilla
8b14b743f9 fix: Apply IndexMut obligations for non-assigning mutable index usages, too 2024-08-01 02:20:52 +09:00
bors
bba84aa836 Auto merge of #17750 - davidbarsky:david/remove-abspath-requirement-in-linked-projects, r=Veykril
fix: remove AbsPath requirement from linkedProjects

Should (fingers crossed!) fix https://github.com/rust-lang/rust-analyzer/issues/17664. I opened the `rustc` workspace with the [suggested configuration](e552c168c7/src/etc/rust_analyzer_settings.json) and I was able to successfully open some rustc crates (`rustc_incremental`) and have IDE functionality.

`@Veykril:` can you try these changes and let me know if it fixed rustc?
2024-07-31 14:31:16 +00:00
David Barsky
e8a90513de fix: remove AbsPath requirement from linkedProjects 2024-07-31 10:07:48 -04:00