Commit Graph

24693 Commits

Author SHA1 Message Date
Lukas Wirth
0522503f14 Thread global symbol interner through as if it was a local 2023-03-29 11:42:08 +02:00
Lukas Wirth
c4582f6d18 Fix visibilities 2023-03-29 11:32:36 +02:00
Lukas Wirth
afe52d270d Run proc-macro-srv tests on rust-lang/rust-analyzer 2023-03-29 11:20:57 +02:00
Lukas Wirth
7498ec730e Drop support for non-syroot proc macro ABIs 2023-03-29 10:57:32 +02:00
bors
7a98e24777 Auto merge of #14431 - Veykril:simplify, r=Veykril
minor: Simplify
2023-03-29 07:28:42 +00:00
bors
0d1ed56bb3 Auto merge of #14430 - Veykril:canonicalize-project-manifest, r=Veykril
fix: Canonicalize rust-project.json manifest path

Looked a bit more into this and I think we can do this after all, I don't see any place where this should break things
cc https://github.com/rust-lang/rust-analyzer/pull/14168 https://github.com/rust-lang/rust-analyzer/pull/14402#issuecomment-1487257246
2023-03-29 07:11:02 +00:00
Lukas Wirth
8ea1afce28 Simplify 2023-03-28 16:32:26 +02:00
David Barsky
e5bfd7ef0a it, uh, turns out that we should be spawning for new servers. oops. 2023-03-28 09:56:01 -04:00
David Barsky
6a42d7f627 fix: allow new, subsequent rust-project.json-based workspaces to get
proc macro expansion.
2023-03-28 09:17:16 -04:00
bors
e7337fc9c3 Auto merge of #14426 - HKalbasi:master, r=HKalbasi
fix stack overflow in `is_ty_uninhabited_from`

fix #14421
2023-03-28 12:52:18 +00:00
hkalbasi
d0d4245a74 use FxHashSet instead of FxHashMap 2023-03-28 15:59:16 +03:30
hkalbasi
d5c7ec499a fix stack overflow in is_ty_uninhabited_from 2023-03-28 15:45:35 +03:30
bors
a375ad668c Auto merge of #14425 - Eclips4:fix_typo, r=Veykril
Fix typo
2023-03-28 09:34:53 +00:00
Eclips4
0a2a50a663 Fix typo 2023-03-28 12:32:51 +03:00
bors
5bba438c9c Auto merge of #14366 - Veykril:linked-proj, r=Veykril
feat: Pop a notification prompting the user to add a Cargo.toml of unlinked file to the linkedProjects

cc https://github.com/rust-lang/rust-analyzer/issues/13226 https://github.com/rust-lang/rust-analyzer/issues/9661
2023-03-28 07:05:43 +00:00
bors
f73510560f Auto merge of #14424 - Veykril:local-trait-impls, r=Veykril
fix: Properly handle local trait impls

Before we only handled trait impls that came from the block of either the trait or the target type, we now handle them correctly by tracking the block we are currently inferring from, then walking that up to collect all block trait impls.
2023-03-28 06:36:35 +00:00
Lukas Wirth
342fd2b9f3 fix: Properly handle local trait impls 2023-03-28 08:34:29 +02:00
bors
a869ca3c29 Auto merge of #14422 - garlicbreadcleric:rustdoc-hashes-escaping, r=HKalbasi
fix(rustdoc): don't escape double hashes outside of Rust code blocks

Fixes #14376
2023-03-27 23:10:51 +00:00
Daniil Kolesnichenko
be17eab08b fix(rustdoc): don't escape double hashes outside of Rust code blocks
Fixes #14376
2023-03-28 05:32:59 +07:00
Lukas Wirth
f1de133820 Canonicalize rust-project.json manifest path 2023-03-27 21:55:02 +02:00
bors
284c1741d6 Auto merge of #14419 - Veykril:proc-ids, r=Veykril
fix: Fix proc-macro paths using incorrect CrateId's for `rust-project.json` workspaces
2023-03-27 15:17:47 +00:00
Lukas Wirth
b03a218b57 fix: Fix proc-macro paths using incorrect CrateId's for rust-project.json workspaces 2023-03-27 17:17:09 +02:00
Lukas Wirth
c04a13cb19 Simplify 2023-03-27 17:16:45 +02:00
DropDemBits
369f4774dd
fix: Move cursor before generated generic 2023-03-26 18:10:41 -04:00
DropDemBits
762eacef74
factor out adding a snippet 2023-03-26 18:08:10 -04:00
DropDemBits
a284a0c7cd
internal: Introduce Structured Snippet API 2023-03-26 17:46:56 -04:00
bors
b99d5eb973 Auto merge of #14415 - davidbarsky:davidbarsky/fix-unrenamed-reload-proc-macros-command, r=Veykril
finish renaming `rust-analyzer/reloadProcMacros` to `rust-analyzer/rebuildProcMacros`

I was trying out #14409, but noticed that actually _running_ that command resulted in VS Code raising an error. This allows me to successfully run `rust-analyzer/rebuildProcMacros`.
2023-03-26 19:24:09 +00:00
David Barsky
ef422406ef finish renaming rust-analyzer/reloadProcMacros to rust-analyzer/rebuildProcMacros 2023-03-26 15:12:25 -04:00
bors
f85fc28508 Auto merge of #14412 - Veykril:proc-macro-op-queue, r=Veykril
internal: Handle proc macro fetching via OpQueue
2023-03-26 07:34:23 +00:00
Lukas Wirth
ee02213e65 Handle proc macro fetching via OpQueue 2023-03-26 09:33:41 +02:00
bors
27c076a367 Auto merge of #14409 - Veykril:vscode-reload-proc, r=Veykril
minor: Add user facing command for reloading proc-macros in VSCode
2023-03-25 20:01:24 +00:00
Lukas Wirth
586db0790c minor: Add user facing command for reloading proc-macros in VSCode 2023-03-25 20:54:24 +01:00
bors
82ec4586f1 Auto merge of #14408 - Veykril:intern-block, r=Veykril
internal: Only intern blocks that declare items

We only used `BlockId` for the block defmap, so this is wasted memory. Lowering for non item declaring blocks is also cheaper now as we no longer have to fully lower a block that defines not items.
2023-03-25 19:48:04 +00:00
Lukas Wirth
675fc88afd internal: Only intern blocks that declare items 2023-03-25 20:44:12 +01:00
bors
d1c7984396 Auto merge of #14407 - Veykril:rename-fix, r=Veykril
fix: Fix renames of locals being broken in macro calls

Fixes https://github.com/rust-lang/rust-analyzer/issues/14379
2023-03-25 18:35:13 +00:00
Lukas Wirth
0daf069b0e fix: Fix renames of locals being broken in macro calls 2023-03-25 18:37:18 +01:00
bors
90340b71ad Auto merge of #14405 - Veykril:proc-macro-loading, r=Veykril
feat: Load proc-macros asynchronously

Closes https://github.com/rust-lang/rust-analyzer/issues/8646
2023-03-25 17:22:45 +00:00
Lukas Wirth
e5f24a6d7c Set proc_macros input when creating the RootDatabase 2023-03-25 18:20:42 +01:00
Lukas Wirth
607375dc20 Load proc-macros asynchronously 2023-03-25 18:06:06 +01:00
Lukas Wirth
e9fb2ffe45 Add lsp command for rebuilding proc macros 2023-03-25 16:50:31 +01:00
Lukas Wirth
d154ea88f9 Split out proc-macros from the CrateGraph 2023-03-25 16:46:44 +01:00
bors
71b23360e7 Auto merge of #14404 - Veykril:proc-macro-loading, r=Veykril
Remove client side proc-macro version check

The server already verifies versions due to ABI picking now so there shouldn't be a need for the client side check anymore
2023-03-25 14:44:53 +00:00
Lukas Wirth
3ae9bfe266 Remove client side proc-macro version check 2023-03-25 15:43:58 +01:00
bors
992a0fc074 Auto merge of #14403 - Veykril:dependencies, r=Veykril
internal: Bump Cargo.lock
2023-03-25 14:15:10 +00:00
Lukas Wirth
39e86e78c3 Bump Cargo.lock 2023-03-25 15:12:39 +01:00
bors
fc848495f4 Auto merge of #14402 - Veykril:project-json-sym-link, r=Veykril
internal: Reject symlinks in project-json

cc https://github.com/rust-lang/rust-analyzer/pull/14168
2023-03-25 13:34:10 +00:00
Lukas Wirth
c01ba4a310 Reject symlinks in project-json 2023-03-25 14:22:05 +01:00
bors
68aa133108 Auto merge of #14380 - DropDemBits:coalesce-indels, r=Veykril
internal: Coalesce adjacent Indels

Originally part of working on a structured snippet API (since sometimes the `$` bit of snippets would be broken off and would lead to it not being recognized), though since this is a pretty separate change, I thought it would make sense to put it into it's own PR.

The implementation is relatively straight forward and not overly optimized, though it's pretty low hanging fruit to optimize it when need be.
2023-03-25 13:16:43 +00:00
Lukas Wirth
3622fb6456 Fix lints 2023-03-25 14:14:12 +01:00
bors
eb791f31e6 Auto merge of #14385 - x2cf:master, r=HKalbasi
Fix VS Code status message formatting error
2023-03-22 21:25:43 +00:00