Commit Graph

38133 Commits

Author SHA1 Message Date
bit-aloo
0afeff11d3 replace panic_any with resume_unwind on Client panic cancelled message 2026-02-01 15:17:00 +05:30
bit-aloo
6334fee6d2 add suggested changes: have a internal error variant, comment on unwindsafe 2026-02-01 15:17:00 +05:30
bit-aloo
c37366e13f adapt ByteRange to new roundtrip 2026-02-01 15:17:00 +05:30
bit-aloo
b9e6c160d2 add error variant for cancelled expansion 2026-02-01 15:16:59 +05:30
bit-aloo
f6bb2dd069 remove repititive error block in callbacks 2026-02-01 15:16:32 +05:30
bit-aloo
0f47fea887 don't kill server on cancellation 2026-02-01 15:15:49 +05:30
bit-aloo
a010936009 make sure we panic in callback so the srv panics and stops 2026-02-01 15:15:48 +05:30
bit-aloo
c2150f47c4 add proc-macro-client error variant 2026-02-01 15:15:10 +05:30
bit-aloo
4d9ce88ea7 catch unwind on client side, and accordingly send Cancel subResponse to server 2026-02-01 15:15:09 +05:30
bit-aloo
765381cae8 add cancel variant to SubResponse 2026-02-01 15:14:20 +05:30
Lukas Wirth
17304e9c7e Merge pull request #21548 from Shourya742/2026-01-29-decouple-codec-with-proc-macro
Make json and postcard protocols explicit, drop generic Codec
2026-01-31 11:00:42 +00:00
Lukas Wirth
bb969782b7 Merge pull request #21460 from Veykril/push-vyqmuvkouywu
feat: Implement support for `feature(new_range)`
2026-01-31 10:31:38 +00:00
Lukas Wirth
eb0588812b Merge pull request #21555 from Veykril/push-vlrmztunpmtm
fix: Fix diagnostics being leaked when diagnostics panic
2026-01-30 15:13:26 +00:00
Lukas Wirth
97ef0b15d1 fix: Fix diagnostics being leaked when diagnostics panic 2026-01-30 16:00:31 +01:00
bit-aloo
fb675454a5 correct visibility of transport layer 2026-01-30 07:47:40 +05:30
bit-aloo
154c878099 remove postcard dep from proc-macro-srv-cli 2026-01-30 07:30:41 +05:30
bit-aloo
7afcfa71bb adapt proc-macro-srv-cli and test 2026-01-30 00:12:14 +05:30
bit-aloo
7af8c850b8 adapt proc-macro-api to remove codec abstraction 2026-01-30 00:11:52 +05:30
bit-aloo
977a1bba68 move json and postcard as top level api's 2026-01-30 00:10:09 +05:30
bit-aloo
c2f4472886 remove codec and framing 2026-01-30 00:09:31 +05:30
Laurențiu Nicola
2e35358260 Merge pull request #21541 from rust-lang/rustc-pull
Rustc pull update
2026-01-29 16:20:26 +00:00
Lukas Wirth
d4ed56f45c Merge pull request #21533 from ChayimFriedman2/autoderef-panic
fix: Fix a panic where an opaque was constrained to an impossible type in method autoderef
2026-01-29 12:33:52 +00:00
Lukas Wirth
799ce0479f Merge pull request #21542 from A4-Tacks/inferred-static
fix: complete inferred type in static
2026-01-29 12:33:16 +00:00
Lukas Wirth
d61f4c7100 Merge pull request #21528 from ChayimFriedman2/doclink-fixes
fix: Handle `Self::EnumVariant` and `Self` on traits in doclinks
2026-01-29 12:32:46 +00:00
A4-Tacks
259f94b3eb fix: complete inferred type in static
Example
---
```rust
struct Foo<T>(T);
static FOO: $0 = Foo(2);
```

**Before this PR**

```text
...
bt u32                      u32
...
```

**After this PR**

```text
...
bt u32                      u32
it Foo<i32>
...
```
2026-01-29 13:48:08 +08:00
The rustc-josh-sync Cronjob Bot
542ce03c86 Merge ref 'ba284f468cd2' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: rust-lang/rust@ba284f468c
Filtered ref: rust-lang/rust-analyzer@374c09e41e
Upstream diff: 94a0cd15f5...ba284f468c

This merge was created using https://github.com/rust-lang/josh-sync.
2026-01-29 04:44:37 +00:00
The rustc-josh-sync Cronjob Bot
3f70ac54ab Prepare for merging from rust-lang/rust
This updates the rust-version file to ba284f468cd2cda48420251efc991758ec13d450.
2026-01-29 04:39:36 +00:00
bors
374c09e41e Auto merge of #151550 - petrochenkov:packhyg2, r=nnethercote
resolve: Replace `Macros20NormalizedIdent` with `IdentKey`

This is a continuation of https://github.com/rust-lang/rust/pull/150741 and https://github.com/rust-lang/rust/pull/150982 based on the ideas from https://github.com/rust-lang/rust/pull/151491#issuecomment-3784421866.

Before this PR `Macros20NormalizedIdent` was used as a key in various "identifier -> its resolution" maps in `rustc_resolve`.
`Macros20NormalizedIdent` is a newtype around `Ident` in which `SyntaxContext` (packed inside `Span`) is guaranteed to be normalized using `normalize_to_macros_2_0`.
This type is also used in a number of functions looking up identifiers in those maps.
`Macros20NormalizedIdent` still contains span locations, which are useless and ignored during hash map lookups and comparisons due to `Ident`'s special `PartialEq` and `Hash` impls.

This PR replaces `Macros20NormalizedIdent` with a new type called `IdentKey`, which contains only a symbol and a normalized unpacked syntax context. (E.g. `IdentKey` == `Macros20NormalizedIdent` minus span locations.)
So we avoid keeping additional data and doing some syntax context packing/unpacking.

Along with `IdentKey` you can often see `orig_ident_span: Span` being passed around.
This is an unnormalized span of the original `Ident` from which `IdentKey` was obtained.
It is not used in map keys, but it is used in a number of other scenarios:
- diagnostics
- edition checks
- `allow_unstable` checks

This is because `normalize_to_macros_2_0` normalization is lossy and the normalized spans / syntax contexts no longer contain parts of macro backtraces, while the original span contains everything.
2026-01-28 18:31:51 +00:00
bors
dba8920ef4 Auto merge of #150945 - scottmcm:tweak-slice-partial-eq, r=Mark-Simulacrum
Tweak `SlicePartialEq` to allow MIR-inlining the `compare_bytes` call

rust-lang/rust#150265 disabled this because it was a net perf win, but let's see if we can tweak the structure of this to allow more inlining on this side while still not MIR-inlining the loop when it's not just `memcmp` and thus hopefully preserving the perf win.

This should also allow MIR-inlining the length check, which was previously blocked, and thus might allow some obvious non-matches to optimize away as well.
2026-01-28 14:31:41 +00:00
bors
d9a55f419d Auto merge of #150722 - nikic:llvm-22, r=cuviper
Update to LLVM 22

Scheduled release date: Feb 24
1.94 becomes stable: Mar 5

Changes:
 * Update to rc2, with one patch to work around our outdated illumos sysroot (41256ab128).
 * Update the host toolchain as well, otherwise we lose cross-language LTO, in particular for jemalloc.
 * Adjust one loongarch assembly test. The split into r and s variants is based on the suggestion in https://github.com/rust-lang/rust/pull/151134.

Depends on:

 * [x] https://github.com/rust-lang/rust/pull/151410
 * [ ] https://github.com/rust-lang/rust/issues/150756
 * [x] https://github.com/llvm/llvm-project/issues/175190
 * [x] https://github.com/llvm/llvm-project/pull/175912
 * [x] https://github.com/llvm/llvm-project/issues/175965
 * [x] https://github.com/llvm/llvm-project/pull/176195
 * [x] https://github.com/llvm/llvm-project/issues/157073
 * [x] https://github.com/llvm/llvm-project/issues/176421
 * [x] https://github.com/llvm/llvm-project/pull/176925
 * [x] https://github.com/llvm/llvm-project/pull/177187
2026-01-28 08:01:21 +00:00
bors
0c088cf219 Auto merge of #151749 - JonathanBrouwer:rollup-IRCTaVD, r=JonathanBrouwer
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#151161 (std: move time implementations to `sys`)
 - rust-lang/rust#151694 (more `proc_macro` bridge cleanups)
 - rust-lang/rust#151711 (stdarch subtree update)
 - rust-lang/rust#150557 (Don't try to evaluate const blocks during constant promotion)
2026-01-27 17:40:26 +00:00
Jonathan Brouwer
5ce2dfd01b Rollup merge of #150557 - dianne:no-const-block-eval-in-promotion, r=lcnr
Don't try to evaluate const blocks during constant promotion

As of https://github.com/rust-lang/rust/pull/138499, trying to evaluate a const block in anything depended on by borrow-checking will result in a query cycle. Since that could happen in constant promotion, this PR adds a check for const blocks there to stop them from being evaluated.

Admittedly, this is a hack. See https://github.com/rust-lang/rust/issues/124328 for discussion of a more principled fix: removing cases like this from constant promotion altogether. To simplify the conditions under which promotion can occur, we probably shouldn't be implicitly promoting division or array indexing at all if possible. That would likely require a FCW and migration period, so I figure we may as well patch up the cycle now and simplify later.

Fixes rust-lang/rust#150464

I'll also lang-nominate this for visibility. I'm not sure there's much to discuss about this PR specifically, but it does represent a change in semantics. In Rust 1.87, the code below compiled. In Rust 1.88, it became a query cycle error. After this PR, it fails to borrow-check because the temporaries can no longer be promoted.

```rust
let (x, y, z);
// We only promote array indexing if the index is known to be in-bounds.
x = &([0][const { 0 }] & 0);
// We only promote integer division if the divisor is known not to be zero.
y = &(1 / const { 1 });
// Furthermore, if the divisor is `-1`, we only promote if the dividend is
// known not to be `int::MIN`.
z = &(const { 1 } / -1);
// The borrowed temporaries can't be promoted, so they were dropped at the ends
// of their respective statements.
(x, y, z);
```
2026-01-27 17:00:54 +01:00
Jonathan Brouwer
2fde0a15d5 Rollup merge of #151711 - folkertdev:stdarch-sync-2026-01-26, r=folkertdev
stdarch subtree update

Subtree update of `stdarch` to 9ba0a3f392.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost
2026-01-27 17:00:54 +01:00
Jonathan Brouwer
f0e32d8eb4 Rollup merge of #151694 - cyrgani:more-pm-cleanup, r=petrochenkov
more `proc_macro` bridge cleanups

Some followups made possible by rust-lang/rust#151505.
2026-01-27 17:00:53 +01:00
Laurențiu Nicola
40cda2f4bd Merge pull request #21537 from lnicola/sync-from-rust
minor: Sync from downstream
2026-01-27 15:14:42 +00:00
Laurențiu Nicola
af32ceacf4 Fix sysroot-abi build 2026-01-27 16:40:49 +02:00
Laurențiu Nicola
0bd115cd42 Merge ref '94a0cd15f597' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 94a0cd15f5976fa35e5e6784e621c04e9f958e57
Filtered ref: 1b46aa0fdb
Upstream diff: 004d710faf...94a0cd15f5

This merge was created using https://github.com/rust-lang/josh-sync.
2026-01-27 16:14:55 +02:00
Laurențiu Nicola
7f78ce2db1 Prepare for merging from rust-lang/rust
This updates the rust-version file to 94a0cd15f5976fa35e5e6784e621c04e9f958e57.
2026-01-27 15:56:27 +02:00
Chayim Refael Friedman
f0e566b6e0 Merge pull request #21535 from lnicola/proc-macro-srv-cli-link
minor: Fix linking of proc-macro-srv-cli
2026-01-27 13:32:36 +00:00
Laurențiu Nicola
86821a1b90 Fix linking of proc-macro-srv-cli 2026-01-27 15:19:00 +02:00
Lukas Wirth
1055f29b4d Merge pull request #21534 from Veykril/push-polxrwlzrzrx
fix: Do not panic if rust-analyzer fails to spawn the discover command
2026-01-27 13:14:13 +00:00
Lukas Wirth
b28aeeb8e4 fix: Do not panic if rust-analyzer fails to spawn the discover command 2026-01-27 14:05:09 +01:00
Chayim Refael Friedman
6e1c4b42b7 Fix a panic where an opaque was constrained to an impossible type in method autoderef 2026-01-27 14:48:40 +02:00
Shoyu Vanilla (Flint)
137eee2f3d Merge pull request #21527 from ChayimFriedman2/builtin-macro-name
fix: Fix macro matching of `meta` then `=>` or `==`
2026-01-27 12:02:41 +00:00
Lukas Wirth
ce2b2ae6eb Merge pull request #21531 from Veykril/push-usuormvursms
minor: Downgrade noisy log
2026-01-27 08:07:23 +00:00
Lukas Wirth
3fbd3c2015 minor: Downgrade noisy log 2026-01-27 08:58:12 +01:00
Folkert de Vries
cac5403c1d Merge pull request #2003 from folkertdev/use-simd-splat
use `simd_splat`
2026-01-26 21:01:13 +00:00
Chayim Refael Friedman
d5d7b04c80 Handle Self::EnumVariant and Self on traits in doclinks 2026-01-26 18:40:51 +02:00
Chayim Refael Friedman
e2ab48898e Merge pull request #21522 from A4-Tacks/tog-macro-delim-semicolon
fix: Add semicolon for toggle_macro_delimiter
2026-01-26 15:25:30 +00:00
A4-Tacks
88595fe7f7 Fix semicolon for toggle_macro_delimiter
Example
---
```rust
macro_rules! sth {
    () => {};
}

sth!$0{ }
```

(old test `sth!{};` is a syntax error in item place)

**Before this PR**

```rust
macro_rules! sth {
    () => {};
}

sth![ ]
```

**After this PR**

```rust
macro_rules! sth {
    () => {};
}

sth![ ];
```
2026-01-26 23:06:56 +08:00