Commit graph

262174 commits

Author SHA1 Message Date
Shoyu Vanilla
d366706cc3 Fix native diagnostics not working 2024-08-07 23:33:39 +09:00
bors
6fc5d09ab2 Auto merge of #17823 - Veykril:mod-unconfigured-diag, r=Veykril
fix: Fix unconfigured diagnostic being attached to the wrong file for modules

Fixes https://github.com/rust-lang/rust-analyzer/issues/17817
2024-08-07 13:08:35 +00:00
Lukas Wirth
c4809d0d6e Fix unconfigured diagnostic being attached to the wrong file for modules 2024-08-07 15:07:09 +02:00
bors
359d5b9283 Auto merge of #17821 - Veykril:project-model-cleanup, r=Veykril
internal: Remove unnecessary CfgFlag definition in project-model
2024-08-07 12:46:26 +00:00
Lukas Wirth
f1f048c9c9 Fix cargo config get env parsing 2024-08-07 14:36:22 +02:00
Lukas Wirth
dbf2c126a3 Remove unnecessary CfgFlag definition in project-model 2024-08-07 14:27:59 +02:00
bors
34cde836d5 Auto merge of #17809 - nicolas-guichard:index-vendored, r=Veykril
Include vendored crates in StaticIndex

`StaticIndex::compute` filters out modules from libraries. This makes an exceptions for vendored libraries, ie libraries actually defined inside the workspace being indexed.

This aims to solve https://bugzilla.mozilla.org/show_bug.cgi?id=1846041 In general StaticIndex is meant for code browsers, which likely want to index all visible source files.
2024-08-07 11:05:49 +00:00
bors
0713a47045 Auto merge of #17813 - roife:fix-issue-17803, r=Veykril
fix: tyck for non-ADT types when searching refs for `Self` kw

See https://github.com/rust-lang/rust-analyzer/pull/15864/files/e0276dc5ddc38c65240edb408522bb869f15afb4#r1389848845

For ADTs, to handle `{error}` in generic args, we should to convert them to ADT for comparisons; for others, we can directly compare the types.
2024-08-07 06:34:46 +00:00
bors
937ef11c55 Auto merge of #17818 - alibektas:hidden_rust_project_json, r=Veykril
Allow rust-project.json to be hidden

Closes #17816
2024-08-07 06:20:40 +00:00
Ali Bektas
7af01f7c90 Allow rust-project.json to be hidden 2024-08-07 03:27:03 +02:00
roife
ac7c466515 fix: tyck for non-ADT types when searching refs for Self kw 2024-08-06 21:52:43 +08:00
Nicolas Guichard
6c1d83b725 Include vendored crates in StaticIndex
StaticIndex::compute filters out modules from libraries. This makes an
exceptions for vendored libraries, ie libraries actually defined inside
the workspace being indexed.

This aims to solve https://bugzilla.mozilla.org/show_bug.cgi?id=1846041
In general StaticIndex is meant for code browsers, which likely want to
index all visible source files.
2024-08-06 14:27:22 +02:00
bors
e686ffe2de Auto merge of #17745 - regexident:improve-crate-manifests, r=Veykril
Improve crate manifests, adding missing `[package.repository]` and `[package.description]` fields

As [discussed on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/Could.20we.20add.20repository.20url.20to.20.60ra_ap_.60.20crates.20on.20crates.2Eio.3F/near/455095161).

cc `@Veykril` `@lnicola`
2024-08-06 06:28:54 +00:00
bors
54362cadba Auto merge of #17805 - ShoyuVanilla:issue-17578, r=Veykril
fix: Panic in path transform with default type parameters

Fixes #17578
2024-08-06 06:14:36 +00:00
Vincent Esche
584f9543ea Replace [package.repository] = "…" of published crates with [package.repository.workspace] = true 2024-08-06 00:26:42 +02:00
Vincent Esche
e15ffa5629 Unify package descriptions by adding references to "rust-analyzer"
With the lack of a README on the individually published library crates and the somewhat cryptic `ra_ap_` prefix it is hard to figure out where those crates belong to, so mentioning "rust-analyzer" feels like auseful hint there.
2024-08-06 00:25:02 +02:00
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
Shoyu Vanilla
ad4e8155ba fix: Panic in path transform with default type parameters 2024-08-06 04:24:40 +09: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