Commit graph

315740 commits

Author SHA1 Message Date
Matthias Krüger
1ff682edcd
Rollup merge of #150980 - fix-ice-150673, r=fee1-dead
Use updated indexes to build reverse map for delegation generics

Fixes rust-lang/rust#150673.

This was a bug that built the `param_def_id_to_index` map with indexes before the new generics were renumbered.

r? @petrochenkov
2026-01-12 13:32:12 +01:00
Matthias Krüger
681058ee88
Rollup merge of #150972 - rename-attrs, r=kivooeo
Rename EII attributes slightly (being consistent in naming things foreign items, not extern items)

r? @Kivooeo
2026-01-12 13:32:11 +01:00
Matthias Krüger
2caeb9ff59
Rollup merge of #150941 - ua/numeric, r=workingjubilee
rustc_parse_format: improve diagnostics for unsupported python numeric grouping

Detect Python-style numeric grouping syntax in format strings (e.g. `{x:,}`)
and emit a clear diagnostic explaining that it is not supported in Rust.
This helps users coming from Python understand the error without exposing
the full set of valid Rust format specifiers.
2026-01-12 13:32:11 +01:00
Matthias Krüger
12b1f3f145
Rollup merge of #150920 - hook-build-mir, r=tiif
Use a hook to decouple `rustc_mir_transform` from `rustc_mir_build`

I noticed that the only point of direct contact between the `rustc_mir_transform` and `rustc_mir_build` crates is a single `build_mir` function, which could easily be changed to a hook function instead.

By making that function a hook, we can make `rustc_mir_transform` no longer have a dependency on `rustc_mir_build`, allowing them to be built/rebuilt independently. That should hopefully allow slightly more parallelism in clean builds and incremental rebuilds of the compiler.
2026-01-12 13:32:09 +01:00
Matthias Krüger
43c084ea61
Rollup merge of #150869 - fix/150841, r=BoxyUwU
Emit error instead of delayed bug when meeting mismatch type for const tuple

And rename some tests

Fixes rust-lang/rust#150841

r? @BoxyUwU
2026-01-12 13:32:08 +01:00
Matthias Krüger
79445c315e
Rollup merge of #150861 - folding-cleanups, r=lcnr
Folding/`ReErased` cleanups

Various cleanups I found while reading this code closely, mostly involving folding and the use of `ReErased`.

r? @lcnr
2026-01-12 13:32:07 +01:00
bjorn3
c451e9bac6 Remove a workaround for a bug
I don't think it is necessary anymore. As I understand it from issue
39504 the original problem was that rustbuild changed a hardlink in the
cargo build dir to point to copy in the sysroot while cargo may have
hardlinked it to the original first. I don't think this happens anymore
and as such this workaround is no longer necessary.
2026-01-12 12:18:28 +00:00
nora
d2cd1ff18d
Merge pull request #2722 from reddevilmidzy/ambig
Fix indent in rust code
2026-01-12 12:05:23 +01:00
dianqk
3b1756fbf5
Run SimplifyComparisonIntegral with opt-level 2 2026-01-12 18:16:39 +08:00
dianqk
37f83fb11d
Use Copy in the SwitchInt terminator
Move can be used only when both the compared operand and the operand on switch are move operands.
This commit directly changes to Copy, because I don't know if Move has beneficial.
2026-01-12 18:16:39 +08:00
dianqk
ac80ccec5f
Only use SSA locals in SimplifyComparisonIntegral 2026-01-12 18:16:34 +08:00
rust-bors[bot]
b115ea2e6a
Auto merge of #150959 - Kobzol:bors-email-3, r=marcoieni
Use the old homu bors e-mail address again

Now that new bors knows how to use the old homu e-mail address (https://github.com/rust-lang/bors/pull/614), we can revert to the old address. I modified the code to keep compatibility with both addresses, so that everything should still work for every merged commit in the past few days. In a few weeks/months, we could remove the temporary bors e-mail address, as at that point no one will likely care about these few merged commits anymore.

Should not be merged until https://github.com/rust-lang/bors/pull/614 is deployed, although the current version in `main` should already mostly work with both addresses, except for CI postprocessing statistics.

Should be backported.
2026-01-12 10:04:23 +00:00
Hans Wennborg
6ca950136d Relax test expectation for @__llvm_profile_runtime_user
After https://github.com/llvm/llvm-project/pull/174174 it has profile
info marking it cold.
2026-01-12 11:03:07 +01:00
Akshit Gaur
e03cb1f0a6
run-make-support: resolve .rmeta companion for .rlib stubs
Add .rmeta resolution for run-make/sysroot-crates-are-unstable test
2026-01-12 10:52:14 +01:00
Jakub Beránek
284d1361e4
Dogfood -Zno-embed-metadata for the standard library 2026-01-12 10:52:13 +01:00
Jakub Beránek
3ca709c745
Remove S-waiting-on-bors after a PR is merged 2026-01-12 09:57:05 +01:00
Tshepang Mbambo
a40e48495f
Merge pull request #2721 from rust-lang/rustc-pull
Rustc pull update
2026-01-12 10:24:10 +02:00
Leon Schuermann
b327e309b9 core: ptr: split_at_mut: fix typo in safety doc
Removes the double subject "it" in the safety documentation of
`core::ptr::split_at_mut` for raw slice pointers, as it does not refer
to anything.

Reported-by: Johnathan Van Why <jrvanwhy@betterbytes.org>
2026-01-12 03:21:16 -05:00
Jana Dönszelmann
6d0f23adad
rename extern item to foreign item 2026-01-12 08:07:23 +01:00
Jana Dönszelmann
322bbdfaaf
rename eii-extern-target 2026-01-12 08:07:23 +01:00
rust-bors[bot]
561364e4d5
Auto merge of #150758 - ColinFinck:rust-mingw-package-as-extensions, r=jieyouxu
build-manifest: Add `rust-mingw` also as extension for "pc-windows-gnu" hosts.

This should enable `rustup component add --target aarch64-pc-windows-gnullvm rust-mingw` when running an `x86_64-pc-windows-gnullvm` toolchain (and vice-versa).

Which itself enables proper cross-compiling of Windows ARM64 binaries on a Windows x64 host without using commercial MSVC.

CC @mati865
2026-01-12 05:35:38 +00:00
The rustc-josh-sync Cronjob Bot
d53ec2a0c8 Merge ref '44a5b55557' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: rust-lang/rust@44a5b55557
Filtered ref: rust-lang/rustc-dev-guide@df5b7c44b8
Upstream diff: 85c8ff69cb...44a5b55557

This merge was created using https://github.com/rust-lang/josh-sync.
2026-01-12 04:29:34 +00:00
The rustc-josh-sync Cronjob Bot
e20d903c1c Prepare for merging from rust-lang/rust
This updates the rust-version file to 44a5b55557.
2026-01-12 04:29:24 +00:00
rust-bors[bot]
840245e91b
Auto merge of #150981 - matthiaskrgr:rollup-px5fFnj, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#147938 (Add const cloning of slices and tests)
 - rust-lang/rust#149718 (Add freeze file times on Windows)
 - rust-lang/rust#150438 (Remove mentions of debootstrap and chroots from the m68k-unknown-none-elf platform support doc)
 - rust-lang/rust#150790 (feat: invisible character help string)
 - rust-lang/rust#150906 (Simplify `#[eii]` macro using methods on ecx)
 - rust-lang/rust#150938 (Port `#[collapse_debuginfo]` to the new attribute parsing system)
 - rust-lang/rust#150953 (std: sys: fs: uefi: Implement copy)
 - rust-lang/rust#150964 (Completely list all unparsed attributes)
 - rust-lang/rust#150975 (ui: add test for normalizing const projections with assoc const equality)

Failed merges:

 - rust-lang/rust#150972 (Rename EII attributes slightly (being consistent in naming things foreign items, not extern items))

r? @ghost
2026-01-12 02:14:38 +00:00
The 8472
468eb45b3f avoid phi node for pointers flowing into Vec appends 2026-01-12 02:54:30 +01:00
The 8472
e6071522db mark rust_dealloc as captures(address)
Co-authored-by: Ralf Jung <post@ralfj.de>
2026-01-12 02:54:22 +01:00
Nicholas Bishop
63481058f7 std: Fix size returned by UEFI tcp4 read operations
The read and read_vectored methods were returning the length of the
input buffer, rather than the number of bytes actually read. Fix by
changing read_inner to return the correct value, and have both read and
read_vectored return that.
2026-01-11 20:08:42 -05:00
Asuna
e555d2c44b Use updated indexes to build reverse map for delegation generics 2026-01-12 00:11:55 +01:00
Matthias Krüger
c31e68ffc4
Rollup merge of #150975 - add-test-norm-const-projections-mgca, r=fmease
ui: add test for normalizing const projections with assoc const equality

This adds a UI test to associated-const-bindings (created new) directory to  ensure that constant projections with associated const equality bounds are correctly normalized.

File added:
- `tests/ui/const-generics/associated-const-bindings/normalization-via-param-env.rs`

r? @fmease
r? @camelid

Fixes rust-lang/rust#120905
2026-01-12 00:02:56 +01:00
Matthias Krüger
565c663413
Rollup merge of #150964 - list_all_attrs, r=jdonszelmann
Completely list all unparsed attributes

Also introduce a `SPECIAL_ATTRIBUTES` list, since `cfg` was incorrectly being detected as an unparsed attribute in `check_attr`.

I will also update https://github.com/rust-lang/rust/issues/131229#issuecomment-2971351163

r? @jdonszelmann
2026-01-12 00:02:55 +01:00
Matthias Krüger
4ea3e90883
Rollup merge of #150953 - uefi-fs-copy, r=joboet
std: sys: fs: uefi: Implement copy

- Using the implementation from sys::fs::common since ther is no built-in copy implementation in UEFI.
- Tested with OVMF on QEMU.

@rustbot label +O-UEFI
2026-01-12 00:02:55 +01:00
Matthias Krüger
d6621f07ae
Rollup merge of #150938 - collapse_debuginfo, r=jdonszelmann
Port `#[collapse_debuginfo]` to the new attribute parsing system

Tracking issue: https://github.com/rust-lang/rust/issues/131229

Felt like doing one again, has been a while :3

r? @jdonszelmann
2026-01-12 00:02:54 +01:00
Matthias Krüger
a44a2d3232
Rollup merge of #150906 - eii-ecx-mehods, r=Kivooeo
Simplify `#[eii]` macro using methods on ecx
2026-01-12 00:02:54 +01:00
Matthias Krüger
66d18446fc
Rollup merge of #150790 - lexer/help-invisible-character, r=Kivooeo,tgross35
feat: invisible character help string

I was playing around with zero width spaces in different programming languages and thought that this error message could be more helpful. Hopefully it's a good first contribution! :)
2026-01-12 00:02:53 +01:00
Matthias Krüger
0a7d5f9f73
Rollup merge of #150438 - m68k-elf-platform-doc-update, r=Noratrieb
Remove mentions of debootstrap and chroots from the m68k-unknown-none-elf platform support doc

I left the mentions of qemu-user-static as it's one of the only easily accessible emulators for m68k, even though you would have to write your own `_start` and such. The C toolchain that is mentioned is also the easiest way I've found so far to get a linker, which is still needed unless I'm missing something.

closes rust-lang/rust#150414

r? @Noratrieb
2026-01-12 00:02:53 +01:00
Matthias Krüger
e1c13ff160
Rollup merge of #149718 - windows_freeze_file_times, r=ChrisDenton
Add freeze file times on Windows

This PR add two new methods on [OpenOptionsExt](https://doc.rust-lang.org/stable/std/os/windows/fs/trait.OpenOptionsExt.html) in order to not change the "last access time" and "last write time" of the file on Windows.

- Tracking Issue: https://github.com/rust-lang/rust/issues/149715
- ACP: https://github.com/rust-lang/libs-team/issues/708
2026-01-12 00:02:52 +01:00
Matthias Krüger
807a5cefd2
Rollup merge of #147938 - const-clone-slice, r=tgross35
Add const cloning of slices and tests

As discussed in https://github.com/rust-lang/rust/pull/143628#discussion_r2390170336, splitting off slice cloning as a separate PR.
r? @tgross35
2026-01-12 00:02:52 +01:00
rust-bors[bot]
44a5b55557
Auto merge of #150748 - nnethercote:canonicalizer-cleanups, r=lcnr
Canonicalizer cleanups

Some cleanups in and around the canonicalizers, found while I was looking closely at this code.

r? @lcnr
2026-01-11 22:58:38 +00:00
Nicholas Nethercote
e7036b136f clippy: remove ty_has_erased_regions.
It duplicates `has_erased_regions` from the compiler.
2026-01-12 09:22:58 +11:00
Nicholas Nethercote
46d8c2beeb Clean up src/dst transmute mess.
- Remove the vacuous `Types`, which provides extremely little value.
- Make sure `src` comes before `dst` in all transmute-related functions.
  (Currently it's a mix: sometimes `src` is first, sometimes it is
  second`.)
2026-01-12 09:22:58 +11:00
Nicholas Nethercote
5e510929c6 Remove useless call to erase_and_anonymize_regions.
The only thing we do with the result is consult the `.def_id` field,
which is unaffected by `erase_and_anonymize_regions`.
2026-01-12 09:22:58 +11:00
Nicholas Nethercote
02e0879c5d Remove redundant call to erase_and_anonymize_regions.
The exact same call appears earlier in this function.
2026-01-12 09:22:58 +11:00
Nicholas Nethercote
71d1b2ca7f Whitespace fixes. 2026-01-12 08:51:49 +11:00
Nicholas Nethercote
2ae298711f Replace two BottomUpFolders with fold_regions.
Because these folders only change regions.

Note: `BottomUpFolder` folds all regions, while `fold_regions` skips
some bound regions. But that's ok because these two folders only modify
`ReVar`s.
2026-01-12 08:51:49 +11:00
rust-bors[bot]
b68e16cfc0
Auto merge of #150741 - petrochenkov:modsplitfast, r=nnethercote
resolve: Use `Macros20NormalizedIdent` in more interfaces

It allows to avoid expensive double normalization in some cases.
This is an attempt to fix the perf regressions from https://github.com/rust-lang/rust/pull/149681.
2026-01-11 19:23:22 +00:00
vsriram
8d1d88bfc4 ui: add test for normalizing const projections with assoc const equality 2026-01-12 00:07:07 +05:30
Usman Akinyemi
76ad528d32 rustc_parse_format: improve diagnostics for unsupported python numeric grouping
Detect Python-style numeric grouping syntax in format strings (e.g. `{x:,}`)
and emit a clear diagnostic explaining that it is not supported in Rust.
This helps users coming from Python understand the error without exposing
the full set of valid Rust format specifiers.

Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
2026-01-11 23:42:38 +05:30
Guillaume Gomez
ef1e4e65b7 Move checks from check_doc_attrs directly into rustc_attr_parsing 2026-01-11 18:36:03 +01:00
rust-bors[bot]
7c41ee66db
Auto merge of #150932 - weihanglo:update-cargo, r=weihanglo
Update cargo submodule

5 commits in 8c133afcd5e0d69932fe11f5907683723f8d361d..6d1bd93c47f059ec1344cb31e68a2fb284cbc6b1
2026-01-09 03:50:15 +0000 to 2026-01-10 12:53:59 +0000
- fix: preserve `dep_name` for build script metadata  (rust-lang/cargo#16494)
- refactor(toml): clarify `to_dependency` for config patch (rust-lang/cargo#16492)
- Add `--id` flag to `cargo report timings` and `cargo report rebuilds` (rust-lang/cargo#16490)
- Display lockfile path in very verbose mode when blocking (rust-lang/cargo#16491)
- fix(info): resolve underscore vs hyphen mismatch in schema lookup (rust-lang/cargo#16455)

---

An extra submodule update right after <https://github.com/rust-lang/rust/pull/150739> due to a relatively impactful nightly regression <https://github.com/rust-lang/cargo/issues/16493>
2026-01-11 15:36:33 +00:00
rust-bors[bot]
1279939b38
Auto merge of #150957 - matthiaskrgr:rollup-Cf6MsNU, r=matthiaskrgr
Rollup of 14 pull requests

Successful merges:

 - rust-lang/rust#148941 (stabilize `Peekable::next_if_map` (`#![feature(peekable_next_if_map)]`))
 - rust-lang/rust#150368 (adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file)
 - rust-lang/rust#150668 (Unix implementation for stdio set/take/replace)
 - rust-lang/rust#150743 (Reword the collect() docs)
 - rust-lang/rust#150776 (Fix the connect_error test on FreeBSD 15+)
 - rust-lang/rust#150781 (Use `rand` crate more idiomatically)
 - rust-lang/rust#150812 (Bump `diesel` to the most recent commit in `cargotest`)
 - rust-lang/rust#150862 (std: sys: fs: uefi: Implement File::flush)
 - rust-lang/rust#150873 (Reenable GCC CI download)
 - rust-lang/rust#150908 (llvm: Update `reliable_f16` configuration for LLVM22)
 - rust-lang/rust#150918 (std: sys: fs: uefi: Implement File::seek)
 - rust-lang/rust#150922 (Subscribe myself to attr parsing)
 - rust-lang/rust#150930 (Remove special case for `AllowedTargets::CrateLevel`)
 - rust-lang/rust#150942 (Port `#[rustc_has_incoherent_inherent_impls]` to attribute parser)

Failed merges:

 - rust-lang/rust#150943 (Port `#[must_not_suspend]` to attribute parser)

r? @ghost
2026-01-11 12:16:33 +00:00