Commit graph

20408 commits

Author SHA1 Message Date
Lukas Wirth
d2fe906a62 Remove unnecessary CfgFlag definition in project-model 2024-08-07 14:27:59 +02:00
bors
ee10731c31 Auto merge of #17813 - roife:fix-issue-17803, r=Veykril
fix: tyck for non-ADT types when searching refs for `Self` kw

See e0276dc5dd (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
Ali Bektas
2426649661 Allow rust-project.json to be hidden 2024-08-07 03:27:03 +02:00
roife
dc104b05cd fix: tyck for non-ADT types when searching refs for Self kw 2024-08-06 21:52:43 +08:00
bors
b23142209e 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
5fe545c87f 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
7dec7e92ea Replace [package.repository] = "…" of published crates with [package.repository.workspace] = true 2024-08-06 00:26:42 +02:00
Vincent Esche
624f2ead7b 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
f8de86b308 Apply Veykril's change suggestions 2024-08-06 00:25:02 +02:00
Vincent Esche
e9ee0d4166 Replace "ra_ap_ide" with "ide (aka ra_ap_ide)" 2024-08-06 00:25:02 +02:00
Vincent Esche
0a45f6dc24 Fix spelling of "data structure" 2024-08-06 00:25:02 +02:00
Vincent Esche
ddb9686246 Fix spelling of "object-oriented" 2024-08-06 00:25:02 +02:00
Vincent Esche
07058a71d4 Fix obsolete repository URL in [package.repository] of rust-analyzer crate 2024-08-06 00:25:02 +02:00
Vincent Esche
6f329e6d5b Add repository URL for published crates' missing [package.repository] fields 2024-08-06 00:25:02 +02:00
Vincent Esche
b5b0f4bc5a Replace "TBD" with more helpful desciptions in published crates' [package.description] fields 2024-08-06 00:25:02 +02:00
Shoyu Vanilla
0241116462 fix: Panic in path transform with default type parameters 2024-08-06 04:24:40 +09:00
bors
4a99d795d0 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
Lukas Wirth
deddbbfa60 Surpress type mismatches in calls with mismatched arg counts 2024-08-05 16:15:28 +02:00
bors
ce73b7cba2 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
e437db2483 Slightly optimize watch list in vfs 2024-08-05 15:56:23 +02:00
bors
25d9e05c03 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
f62d7b9f11 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
eea1e9b21f perf: Segregate syntax and semantic diagnostics 2024-08-05 22:12:47 +09:00
Shoyu Vanilla
8a51419a2d feat: Implement diagnostic for await outside of async 2024-08-05 21:47:57 +09:00
bors
fbed308ebe 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
f6197355eb 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
c9e1cb4887
Simplify 2024-08-05 13:58:01 +02:00
Lukas Wirth
188c577855 Newtype ErasedFileAstId 2024-08-05 13:46:47 +02:00
Lukas Wirth
d2dd4f6d5f Split out syntax-bridge into a separate crate 2024-08-05 13:45:00 +02:00
Lukas Wirth
fcb88832de Simplify FileDelegate 2024-08-05 13:03:03 +02:00
bors
000eed1da8 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
f053b1aa6a feat: Load sysroot library via cargo metadata 2024-08-05 12:18:19 +02:00
Shoyu Vanilla
8fa454d7aa fix: Insert a generic arg for impl Trait when lowering generic args 2024-08-05 00:06:29 +09:00
Young-Flash
747615d95b test: add test case for inlay hint support for expr with label 2024-08-04 19:19:15 +08:00
Lukas Wirth
c6ae9cde99 Wait with change processing until the vfs is done 2024-08-02 17:09:25 +02:00
Lukas Wirth
8286847bee internal: Load VFS config changes in parallel 2024-08-02 13:04:15 +02:00
Lukas Wirth
758ad25229 internal: Remove AbsPathBuf::TryFrom impl that checks too many things at once 2024-08-02 11:08:19 +02:00
Young-Flash
722020e63f feat: support inlay hint for more expr with label 2024-08-01 22:06:15 +08:00
Shoyu Vanilla
3121a91e0a fix: Insert a tail Ok(()) for expr block instead of wrapping with Ok 2024-08-01 21:24:28 +09:00
Wilfred Hughes
e7d61e8f9c 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
Shoyu Vanilla
b5494d7cc3 Prevent redundant obigation push for assignee exprs 2024-08-01 02:51:33 +09:00
Shoyu Vanilla
20e2623234 fix: Apply IndexMut obligations for non-assigning mutable index usages, too 2024-08-01 02:20:52 +09:00
bors
f982f3fa2c 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
8ac0ffecc1 fix: remove AbsPath requirement from linkedProjects 2024-07-31 10:07:48 -04:00
Shoyu Vanilla
a871730142
Add a test case 2024-07-31 10:47:13 +09:00
Shoyu Vanilla
92a6e51b20 fix: Errors on method call inferences with elided lifetimes 2024-07-31 02:36:44 +09:00
bors
4feec4b0c1 Auto merge of #17744 - alibektas:debug_env_not_set, r=Veykril
minor: Set tracing level to debug when `cargo config get env` fails

fixes #17739
2024-07-30 11:02:21 +00:00
Ali Bektas
02c066cd1c Set tracing level to debug when cargo config get env fails 2024-07-30 12:57:21 +02:00
bors
412c915139 Auto merge of #17735 - alibektas:ratoml_workspaces, r=Veykril
feat: Introduce workspace `rust-analyzer.toml`s

In order to globally configure a project it was, prior to this PR, possible to have a `ratoml` at the root path of a project. This is not the case anymore. Instead we now let ratoml files that are placed at the root of any workspace have a new scope called `workspace`. Although there is not a difference between a `workspace` scope and and a `global` scope, future PRs will change that.
2024-07-30 06:49:14 +00:00
bors
14f7a91677 Auto merge of #17742 - Veykril:wrong-retries, r=Veykril
fix: Fix incorrect retrying of inlay hint requests
2024-07-30 06:35:28 +00:00