Commit Graph

38089 Commits

Author SHA1 Message Date
bit-aloo
df044ee754 fix linking of postcard test 2026-01-28 00:13:32 +05:30
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
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
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
Chayim Refael Friedman
6ef381d4e2 Fix macro matching of meta then => or ==
The parser declared it was invalid meta because it consumed the lone `=`, which is incorrect.
2026-01-26 16:13:06 +02:00
Chayim Refael Friedman
d7666fad95 Merge pull request #21408 from kouhe3/default_field_values
default_field_values
2026-01-26 13:30:27 +00:00
Chayim Refael Friedman
a425c08b8e Merge pull request #21513 from A4-Tacks/extract-fun-name
Improve extract_function name
2026-01-26 13:29:41 +00:00
kouhe
8c5a9ebc61 Implement default field values .. syntax
- Added `RecordSpread` enum to distinguish between no spread, field defaults, and spread expressions
- Updated `FieldData` to include `default_value` field
- Modified record literal lowering to handle default field values
- Updated diagnostics to check for missing fields considering defaults
- Added methods to get matched fields for records for completions
- Enhanced hover support for struct rest patterns
2026-01-26 19:01:21 +08:00
Laurențiu Nicola
c1f9cd1327 Merge pull request #21524 from edwin0cheng/patch-1
Fix rust-src installation command in FAQ
2026-01-26 08:54:39 +00:00
Edwin Cheng
6be960c79d Fix rust-src installation command in FAQ
Correct the command to install rust-src in the FAQ.
2026-01-26 16:45:48 +08:00
A4-Tacks
70a090c1bd Improve filter predicate to length cond 2026-01-26 15:41:43 +08:00
Chayim Refael Friedman
cf38ac29fb Merge pull request #21495 from A4-Tacks/comp-else-before-tuple
Fix not complete 'else' before tuple
2026-01-26 06:55:56 +00:00
A4-Tacks
cc725f8cbc Fix not complete 'else' before tuple
Example
---
```rust
fn foo() -> (i32, i32) {
    if foo {} el$0
    (2, 3)
}
```

**Before this PR**

```rust
...
kw crate::
kw false
kw for
...
```

**After this PR**

```rust
...
kw crate::
kw else
kw else if
kw false
kw for
...
```
2026-01-26 13:35:48 +08:00
Chayim Refael Friedman
1f7625d072 Merge pull request #21514 from A4-Tacks/range-for-to-while-handle-continue
fix: Fix incorrect continue for convert_range_for_to_while
2026-01-26 03:49:28 +00:00
bors
1b46aa0fdb Auto merge of #150353 - llogiq:rustc-hash-refactor, r=eholk
refactor rustc-hash integration

I found that rustc-hash is used in multiple compiler crates. Also some types use `FxBuildHasher` whereas others use `BuildHasherDefault<FxHasher>` (both do the same thing).

In order to simplify future hashing experiments, I changed every location to use `rustc_data_structures::fx::*` types instead, and also removed the `BuildHasherDefault` variant. This will simplify future experiments with hashing (for example trying out a hasher that doesn't implement `Default` for whatever reason).
2026-01-26 02:27:05 +00:00
Chayim Refael Friedman
93b28ddd74 Merge pull request #21523 from Shourya742/2026-01-26-correct-ungrammar-path-in-patch
correct ungrammar path in patch
2026-01-26 01:43:39 +00:00
bit-aloo
c92bdd39f3 correct ungrammar path in patch 2026-01-26 05:44:04 +05:30
bors
ea7b2caf5e Auto merge of #151337 - the8472:bail-before-memcpy2, r=Mark-Simulacrum
optimize `vec.extend(slice.to_vec())`, take 2

Redoing https://github.com/rust-lang/rust/pull/130998
It was reverted in https://github.com/rust-lang/rust/pull/151150 due to flakiness. I have traced this to layout randomization perturbing the test (the failure reproduces locally with layout randomization), which is now excluded.
2026-01-25 19:45:35 +00:00
bors
f1af74562e Auto merge of #151556 - eggyal:unused-assignment-to-unused-variable, r=cjgillot
Fix suppression of `unused_assignment` in binding of `unused_variable`

Unused assignments to an unused variable should trigger only the `unused_variables` lint and not also the `unused_assignments` lint. This was previously implemented by checking whether the span of the assignee was within the span of the binding pattern, however that failed to capture situations was imported from elsewhere (eg from the input tokenstream of a proc-macro that generates the binding pattern).

By comparing the span of the assignee to those of the variable introductions instead, a reported stable-to-stable regression is resolved.

This fix also impacted some other preexisting tests, which had (undesirably) been triggering both the `unused_variables` and `unused_assignments` lints on the same initializing assignment; those tests have therefore now been updated to expect only the former lint.

Fixes rust-lang/rust#151514
r? cjgillot (as author of reworked liveness testing in rust-lang/rust#142390)
2026-01-25 13:10:32 +00:00
Lukas Wirth
2532c48f1e Merge pull request #21518 from pksunkara/pavan/jj/uwxtukzt
internal: Use parser expect where possible
2026-01-26
2026-01-25 10:00:58 +00:00
bors
6506ca59ef Auto merge of #151634 - matthiaskrgr:rollup-cE0JR24, r=matthiaskrgr
Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#145393 (Add codegen test for removing trailing zeroes from `NonZero`)
 - rust-lang/rust#148764 (ptr_aligment_type: add more APIs)
 - rust-lang/rust#149869 (std: avoid tearing `dbg!` prints)
 - rust-lang/rust#150065 (add CSE optimization tests for iterating over slice)
 - rust-lang/rust#150842 (Fix(lib/win/thread): Ensure `Sleep`'s usage passes over the requested duration under Win7)
 - rust-lang/rust#151505 (Various refactors to the proc_macro bridge)
 - rust-lang/rust#151560 (relnotes: fix 1.93's `as_mut_array` methods)
 - rust-lang/rust#151317 (x86 soft-float feature: mark it as forbidden rather than unstable)
 - rust-lang/rust#151577 (Rename `DepKindStruct` to `DepKindVTable`)
 - rust-lang/rust#151620 (Fix 'the the' typo in library/core/src/array/iter.rs)
2026-01-25 09:56:27 +00:00
Matthias Krüger
d6657fd03b Rollup merge of #151620 - vinDelphini:fix-typo-library-core, r=joboet
Fix 'the the' typo in library/core/src/array/iter.rs

This PR fixes a small grammatical error in a safety comment within `library/core/src/array/iter.rs` where the word "the" was duplicated.

No functional changes.
2026-01-25 07:43:01 +01:00
Matthias Krüger
9ea63690dc Rollup merge of #151577 - Zalathar:dep-kind-vtable, r=Kivooeo
Rename `DepKindStruct` to `DepKindVTable`

This type is used by dependency-tracking code in the query system, for looking up function pointers and other metadata associated with a particular `DepKind`.

Calling it “struct” is not particularly helpful, whereas calling it a “vtable” at least gives some basic intuition for what it is and how it is used.

Some associated identifiers have also drifted a bit over time, and this PR adjusts those as well.

There should be no change to compiler behaviour.

r? nnethercote (or compiler)
2026-01-25 07:43:01 +01:00
Matthias Krüger
5fa5ec59e1 Rollup merge of #151317 - RalfJung:x86-soft-float, r=workingjubilee
x86 soft-float feature: mark it as forbidden rather than unstable

I am not sure why I made it "unstable" in f755f4cd1a; I think at the time "forbidden" did not work for some reason.

Making it "forbidden" instead has no significant effect on `-Ctarget-feature` use, it just changes the warning. It *does* have the effect that one cannot query this using `cfg(target_feature)` on nightly any more, but that seems fine to me. It only ever worked as an accidental side-effect of f755f4cd1a2450da62b53f98f662d445f1f048b2 anyway.

r? @workingjubilee
2026-01-25 07:43:01 +01:00
Matthias Krüger
9d10d2a13f Rollup merge of #151560 - cuviper:relnotes-as_mut_array, r=Mark-Simulacrum
relnotes: fix 1.93's `as_mut_array` methods

The links are correct, but text typoed `as_array_mut`.
2026-01-25 07:43:00 +01:00
Matthias Krüger
e107345666 Rollup merge of #151505 - bjorn3:proc_macro_refactors, r=petrochenkov,Kobzol
Various refactors to the proc_macro bridge

This reduces the amount of types, traits and other abstractions that are involved with the bridge, which should make it easier to understand and modify. This should also help a bit with getting rid of the type marking hack, which is complicating the code a fair bit.

Fixes: rust-lang/rust#139810
2026-01-25 07:43:00 +01:00
Matthias Krüger
ecb3a4236e Rollup merge of #150842 - PaulDance:patches/fix-win7-sleep, r=Mark-Simulacrum
Fix(lib/win/thread): Ensure `Sleep`'s usage passes over the requested duration under Win7

Fixes rust-lang/rust#149935. See the added comment for more details.

This makes the concerned test now reproducibly pass, for us at least. Also, testing this separately revealed successful: see the issue.

@rustbot label C-bug I-flaky-test O-windows-7 T-libs A-time A-thread
2026-01-25 07:42:59 +01:00
Matthias Krüger
9c68dc098f Rollup merge of #150065 - is57primenumber:add-slice-cse-test, r=Mark-Simulacrum
add CSE optimization tests for iterating over slice

This PR is regression test for issue rust-lang/rust#119573.
This PR introduces a new regression test to verify a critical optimization known as Common Subexpression Elimination (CSE) is correctly applied during various slice iteration patterns.
2026-01-25 07:42:59 +01:00
Matthias Krüger
6b0744c65e Rollup merge of #149869 - joboet:torn-dbg, r=Mark-Simulacrum
std: avoid tearing `dbg!` prints

Fixes https://github.com/rust-lang/rust/issues/136703.

This is an alternative to rust-lang/rust#149859. Instead of formatting everything into a string, this PR makes multi-expression `dbg!` expand into multiple nested matches, with the final match containing a single `eprint!`. By using macro recursion and relying on hygiene, this allows naming every bound value in that `eprint!`.

CC @orlp

r? libs
2026-01-25 07:42:58 +01:00
Matthias Krüger
7cff654c45 Rollup merge of #148764 - GrigorenkoPV:aligment_api, r=scottmcm
ptr_aligment_type: add more APIs

As per https://github.com/rust-lang/rust/issues/102070#issuecomment-1650043557

Tracking issue: rust-lang/rust#102070

Mostly duplicating methods that previously worked with `usize`-represented alignments.

Naming follows a convention of `align: usize`, `alignment: Alignment`.
2026-01-25 07:42:57 +01:00
Matthias Krüger
c15681c8a7 Rollup merge of #145393 - clubby789:issue-138497, r=Mark-Simulacrum
Add codegen test for removing trailing zeroes from `NonZero`

Closes rust-lang/rust#138497
2026-01-25 07:42:56 +01:00
bors
a2ab0690a6 Auto merge of #151065 - nagisa:add-preserve-none-abi, r=petrochenkov
abi: add a rust-preserve-none calling convention

This is the conceptual opposite of the rust-cold calling convention and is particularly useful in combination with the new `explicit_tail_calls` feature.

For relatively tight loops implemented with tail calling (`become`) each of the function with the regular calling convention is still responsible for restoring the initial value of the preserved registers. So it is not unusual to end up with a situation where each step in the tail call loop is spilling and reloading registers, along the lines of:

    foo:
        push r12
        ; do things
        pop r12
        jmp next_step

This adds up quickly, especially when most of the clobberable registers are already used to pass arguments or other uses.

I was thinking of making the name of this ABI a little less LLVM-derived and more like a conceptual inverse of `rust-cold`, but could not come with a great name (`rust-cold` is itself not a great name: cold in what context? from which perspective? is it supposed to mean that the function is rarely called?)
2026-01-25 02:49:32 +00:00
Pavan Kumar Sunkara
8efe106f4c internal: Use parser expect where possible 2026-01-25 07:40:32 +05:30
bors
e86e242abd Auto merge of #151544 - weihanglo:update-cargo, r=weihanglo
Update cargo submodule

14 commits in 85eff7c80277b57f78b11e28d14154ab12fcf643..efcd9f58636c1990393d495159045d9c35e43b8f
2026-01-15 16:18:08 +0000 to 2026-01-23 13:50:59 +0000
- chore(deps): update cargo-semver-checks to v0.46.0 (rust-lang/cargo#16548)
- Increase cache_lock test timeout (rust-lang/cargo#16545)
- iTerm now supports OSC 9;4 (terminal window progress bar) (rust-lang/cargo#16506)
- chore: Updated compiler errors for Rust 1.93 (rust-lang/cargo#16543)
- test(build-std): adjust snapshot (rust-lang/cargo#16539)
- chore: bump to 0.96.0 (rust-lang/cargo#16538)
- fix: update `resolve_all_features()` to filter pkg deps (rust-lang/cargo#16221)
- fix: show implicit_minimum_version_req emitted source once per package (rust-lang/cargo#16535)
- fix: `--remap-path-scope` stabilized in 1.95-nightly (rust-lang/cargo#16536)
- feat(lints): Add non_kebab_case_bin lint  (rust-lang/cargo#16524)
- fix(rm): Suggest table flags when none are specified (rust-lang/cargo#16533)
- fix(patch): clean up patch-related error messages (rust-lang/cargo#16498)
- Store artifact deps in build unit dir (rust-lang/cargo#16519)
- refactor(timings): reuse timing metric collection logic between `--timings` and `-Zbuild-analysis` (rust-lang/cargo#16497)
2026-01-24 19:11:57 +00:00
Lukas Wirth
cc76a8a0c6 Merge pull request #21501 from robertoaloi/ra-bump-notify
Bump notify from 8.0.0. to 8.2.0
2026-01-24 17:32:18 +00:00
Simonas Kazlauskas
73b221a686 abi: add a rust-preserve-none calling convention
This is the conceptual opposite of the rust-cold calling convention and
is particularly useful in combination with the new `explicit_tail_calls`
feature.

For relatively tight loops implemented with tail calling (`become`) each
of the function with the regular calling convention is still responsible
for restoring the initial value of the preserved registers. So it is not
unusual to end up with a situation where each step in the tail call loop
is spilling and reloading registers, along the lines of:

    foo:
        push r12
        ; do things
        pop r12
        jmp next_step

This adds up quickly, especially when most of the clobberable registers
are already used to pass arguments or other uses.

I was thinking of making the name of this ABI a little less LLVM-derived
and more like a conceptual inverse of `rust-cold`, but could not come
with a great name (`rust-cold` is itself not a great name: cold in what
context? from which perspective? is it supposed to mean that the
function is rarely called?)
2026-01-24 19:23:17 +02:00
bjorn3
643303fe0b Fix review comments 2026-01-24 14:44:03 +00:00
bjorn3
fb28602fbe Merge FreeFunctions trait into Server trait
And rename FreeFunctions struct to Methods.
2026-01-24 14:44:03 +00:00
bjorn3
25e3119935 Various simplifications after moving all bridge methods to a single type 2026-01-24 14:44:03 +00:00
bjorn3
0d59695780 Move all bridge methods into a single type 2026-01-24 14:44:03 +00:00