Commit Graph

314141 Commits

Author SHA1 Message Date
Lukas Wirth 1ea45e078f Merge pull request #21357 from Veykril/push-rsulypnywlsv
Drop AstIdMap asynchronously
2025-12-28 12:01:36 +00:00
Lukas Wirth 11df3a0dec Drop AstIdMap asynchronously 2025-12-28 12:51:53 +01:00
Lukas Wirth 72b409d28b Merge pull request #21355 from Veykril/push-zkmupnykkvln
perf: Reduce channel lock contention for drop-threads
2025-12-28 10:57:22 +00:00
Lukas Wirth 5adad1a8ad perf: Reduce channel lock contention for drop-threads 2025-12-28 11:43:08 +01:00
Lukas Wirth f574941677 Merge pull request #21353 from Veykril/push-wquzszzrzwpu
perf: Pre-allocate some buffers in parsing
2025-12-28 10:27:33 +00:00
Lukas Wirth b717c74823 perf: Pre-allocate some buffers in parsing 2025-12-28 11:18:43 +01:00
Lukas Wirth 5a119a5780 Merge pull request #21352 from Veykril/push-knwlqypxtukr
minor: Remove unneeded allocation in proc-macro-srv-cli
2025-12-28 09:26:44 +00:00
Lukas Wirth 49c5102e24 Merge pull request #21351 from ChayimFriedman2/format-args-kw
fix: Fix parsing of `format_args!("...", keyword=...)`
2025-12-28 09:19:59 +00:00
Lukas Wirth fa8649fccd minor: Remove unneded allocation in proc-macro-srv-cli 2025-12-28 10:17:37 +01:00
Lukas Wirth 33ad9ca3bc Merge pull request #21349 from ChayimFriedman2/no-generic-span
internal: Make token trees no longer generic over the span
2025-12-28 08:41:57 +00:00
Chayim Refael Friedman 6851e398ae Make token trees no longer generic over the span
Since the proc macro server no longer uses them (with a different span type).
2025-12-28 09:28:55 +02:00
Chayim Refael Friedman c27f6d5481 Fix parsing of format_args!("...", keyword=...) 2025-12-28 06:35:10 +02:00
Lukas Wirth a5bdd104f4 Merge pull request #21342 from yotamofek/patch-1
Fix grammar in "Use of AI tools" section
2025-12-27 19:21:49 +00:00
Chayim Refael Friedman 0146f8dc31 Merge pull request #21344 from flodiebold/push-prxvkyqorowx
internal: Don't use MIR ProjectionElem in closure analysis
2025-12-27 18:36:37 +00:00
Florian Diebold bb5c82c406 Don't use MIR ProjectionElem in closure analysis
Almost all of the enum variants were unused, it's not very useful.
2025-12-27 19:18:41 +01:00
Chayim Refael Friedman 28b8503c90 Merge pull request #21348 from ChayimFriedman2/reenable-variance
fix: Reenable fixpoint variance
2025-12-27 18:14:53 +00:00
Chayim Refael Friedman fc1cb48d3b Fix tests that relied on the default variance to be invariant
And now it changed to bivariant.
2025-12-27 20:06:24 +02:00
Chayim Refael Friedman a9da655c9b Bring back fixpoint iteration for variance 2025-12-27 19:57:42 +02:00
Chayim Refael Friedman 6ff77ac18d Merge pull request #21345 from Shourya742/2025-12-27-remove-channel-mess
Remove Channel workaround from proc-macro-srv
2025-12-27 17:21:43 +00:00
bit-aloo 671aab6dbd make expand ProcMacroServerSpan type live longer 2025-12-27 18:08:42 +05:30
bit-aloo 43cda6d5ec remove unwraps from source_text impl 2025-12-27 17:52:16 +05:30
bit-aloo 7e873dbeb4 rename BidirectionalStruct to ProcMacroClientHandle 2025-12-27 17:49:32 +05:30
bit-aloo 359fe9a231 remove read and write generics, also remove lock from the beginning and follow lock when required pattern 2025-12-27 17:44:31 +05:30
bit-aloo 462b4a02cf attach lifetime to ProcMacroClientHandle and make necessary changes to proc-macro-srv 2025-12-27 17:43:14 +05:30
bit-aloo d494dbcf97 make framing buffer send 2025-12-27 17:41:16 +05:30
Lukas Wirth 31b0cb9484 Merge pull request #21341 from Veykril/veykril/push-wsrtvrkzqyvr
internal: Move library and local root inputs to base-db
2025-12-27 10:24:52 +00:00
Lukas Wirth 61203a098e internal: Move library and local root inputs to base-db 2025-12-27 11:16:17 +01:00
Lukas Wirth e90e264290 Merge pull request #20741 from A4-Tacks/comp-macro-segment
feat: Add macro segment completion
2025-12-27 10:02:35 +00:00
Yotam Ofek e80997d02c Fix grammar in "Use of AI tools" section 2025-12-27 11:58:14 +02:00
A4-Tacks 06a6a00895 Minor fixup 2025-12-27 17:28:22 +08:00
Lukas Wirth 9ab53d6d9e Merge pull request #21340 from Shourya742/2025-12-26-better-bm-ergonomics
Refactor: Bidirectional messages
2025-12-27 08:59:21 +00:00
bit-aloo 720d9eecc7 remove crossbeam-channel from proc-macro-srv-cli 2025-12-27 10:40:42 +05:30
bit-aloo 38f1cccef2 make source_text take non mutable reference of self 2025-12-27 09:43:01 +05:30
bit-aloo 8ae38dc333 rename handler's to be context specific 2025-12-27 09:21:32 +05:30
bit-aloo 231690657e add bidirectional handle in proc-macro-srv-cli to interact with client and srv 2025-12-27 09:07:08 +05:30
A4-Tacks 22fbbd4306 Add macro segment completion
Example
---
```rust
macro_rules! foo {
    ($($x:$0)*) => ();
}
```

**Completion items**:

```text
ba block
ba expr
ba expr_2021
ba ident
ba item
ba lifetime
ba literal
ba meta
ba pat
ba pat_param
ba path
ba stmt
ba tt
ba ty
ba vis
```
2025-12-27 05:04:18 +08:00
bit-aloo 8aa859476c adapt source_text to new handler 2025-12-26 23:04:19 +05:30
bit-aloo 8f141eaab3 remove old subreq/resp constructs 2025-12-26 23:04:04 +05:30
bit-aloo abf22599e3 add bidirectionalHandler trait 2025-12-26 23:03:42 +05:30
Lukas Wirth 50ed4e91fc Merge pull request #21200 from ChayimFriedman2/fake-impls
perf: Do not really expand builtin derives, instead treat them specifically
2025-12-26 13:31:48 +00:00
Chayim Refael Friedman 02763ff0ec Test builtin derives expansions
Via a hack to disable their fast path.
2025-12-26 15:00:27 +02:00
Chayim Refael Friedman 04529b2e83 Allow IDE layer to "see" fake builtin derive impls
It sees them as regular impls; the details are abstracted. It's beautiful for the IDE layer, and less beautiful for `hir`, so this is a big change.

Some small differences still exist:

 - We show builtin derives impl (to the IDE layer) as if they have had no generic parameters. It is possible to show the parameters, but that means also having to handle fake impls in `TypeParam` etc., and the benefit is questionable.
 - Getting the fn *def* type of a method of a builtin derive impl is not supported, as there is no real `FunctionId`, therefore no `CallableDefId`. The trait method is returned instead. Note: getting the fn *ptr* type of the method is supported well.
 - Builtin derive impls and their methods do not fully support `HasSource`, because, well, they have no source (at least, not in the form of `ast::Impl` and `ast::Fn`). To support them, we use the derive's `TextRange` where possible, and the trait method's source when not.

 It's important to note that the def map still records the `MacroCallId`. I have doubts over this, as this means it's very easy to create the queries we don't want to create, but it does make things more convenient. In particular, a nicety of this setup is that even "Expand macro recursively" works (it creates the macro input/output query, but given that they will only be created when the user invokes the command, that does not seem to be a problem).
2025-12-26 15:00:08 +02:00
Lukas Wirth abefb5254a Merge pull request #20193 from ChayimFriedman2/setting-rename-conflict
feat: Provide a setting to disable showing rename conflicts
2025-12-26 09:08:49 +00:00
Lukas Wirth 9fcf441721 Merge pull request #21297 from osdyne/fix-lsp-configuration-request
fix: Fix LSP configuration request handling
2025-12-26 09:05:09 +00:00
Lukas Wirth 4665de582c Merge pull request #21330 from A4-Tacks/to-guarded-indent
Fix indent for convert_to_guarded_return
2025-12-26 09:02:22 +00:00
Lukas Wirth 856cc543a3 Merge pull request #21335 from ChayimFriedman2/tupled-closure
internal: Store closures with "tupled" inputs
2025-12-26 08:18:20 +00:00
Lukas Wirth 2986b2714e Merge pull request #21249 from Shourya742/2025-11-27-bidirectional-protocol
Add bidirectional messaging proc-macro-srv
2025-12-26 08:08:24 +00:00
Chayim Refael Friedman 9d0a93fdf3 Merge pull request #21337 from ChayimFriedman2/stabilize-type-mismatch-diag
feat: Stabilize type mismatch diagnostic 🎉
2025-12-26 08:01:56 +00:00
Chayim Refael Friedman 2f3a23c7e9 Stabilize type mismatch diagnostic 🎉 2025-12-26 09:35:55 +02:00
Chayim Refael Friedman ebb0d0b7bd Make builtin derives cheaper, by not really expanding them, instead store them unexpanded 2025-12-25 16:26:11 +02:00