Commit Graph

314128 Commits

Author SHA1 Message Date
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 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
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
Chayim Refael Friedman 2c7bd6d462 Store closures with "tupled" inputs
And remove it when needed, the opposite of what was previously, where we stored without a tuple and tupled for the solver (because it requires that).

Because this is what rustc does, and generally, the closer we follow rustc, the easier our lives become.

The weird name `signature_unclosure()` also comes from rustc.
2025-12-25 16:18:11 +02:00
Lukas Wirth 4b68b7ae35 Merge pull request #21334 from Veykril/veykril/push-ozmlxzxpvrun
Introduce cargo-machete ci step
2025-12-25 10:13:35 +00:00
Lukas Wirth 38ff5a7a5e Introduce cargo-machete ci step 2025-12-25 10:38:05 +01:00
Laurențiu Nicola a8ad2e2459 Merge pull request #21331 from rust-lang/rustc-pull
minor: Rustc pull update
2025-12-25 06:00:15 +00:00
The rustc-josh-sync Cronjob Bot a1ae5afd66 Merge ref 'e7d44143a12a' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: e7d44143a1
Filtered ref: fe2cf3fa56a4ce08f56aee660fbe289c7d13dede
Upstream diff: https://github.com/rust-lang/rust/compare/f41f40408d719aa9ae0c6bfa17619d8f3f9e5b99...e7d44143a12a526488e4f0c0d7ea8e62a4fe9354

This merge was created using https://github.com/rust-lang/josh-sync.
2025-12-25 04:19:28 +00:00
The rustc-josh-sync Cronjob Bot faac1b517f Prepare for merging from rust-lang/rust
This updates the rust-version file to e7d44143a1.
2025-12-25 04:19:22 +00:00
bors e7d44143a1 Auto merge of #150351 - JonathanBrouwer:rollup-knpqs9d, r=JonathanBrouwer
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#150141 (Misc cleanups from reading some borrowck code)
 - rust-lang/rust#150297 (Fix compile issue in Vita libstd)
 - rust-lang/rust#150341 (Fix some divergences with the cg_clif subtree)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-24 16:30:07 +00:00
Jonathan Brouwer 990783f83e Rollup merge of #150341 - bjorn3:fix_cg_clif_divergence, r=bjorn3
Fix some divergences with the cg_clif subtree

For some reason git-subtree incorrectly synced those changes.

r? `@ghost`

`@rustbot` label +A-codegen +A-cranelift +T-compiler
2025-12-24 16:37:11 +01:00
Jonathan Brouwer 8e84475e25 Rollup merge of #150297 - forkgull:notgull/vita, r=joboet
Fix compile issue in Vita libstd

Unfortunately it looks like the Vita libc does not support
the "utimensat" function, which is needed for setting file times.
To fix the build, this commit marks Vita as unsupported for the
function that sets the file times.
2025-12-24 16:37:11 +01:00
Jonathan Brouwer c772ca3a6a Rollup merge of #150141 - BoxyUwU:borrowck_cleanup_1, r=lcnr
Misc cleanups from reading some borrowck code

title

r? lcnr
2025-12-24 16:37:10 +01:00
bjorn3 a8c9cb5f77 Fix some divergences with the cg_clif subtree
For some reason git-subtree incorrectly synced those changes.
2025-12-24 15:16:59 +00:00
Boxy Uwu 0e0911b5d8 Misc cleanups 2025-12-24 15:06:06 +00:00
A4-Tacks 5c99ebf42c Fix indent for convert_to_guarded_return 2025-12-24 21:46:57 +08:00