Commit graph

315398 commits

Author SHA1 Message Date
Jonathan Brouwer
a89683dd95
Rollup merge of #150151 - destabilise-target-spec-json, r=Kivooeo
Destabilise `target-spec-json`

Per rust-lang/compiler-team#944:

> Per https://github.com/rust-lang/rust/issues/71009, the ability to load target spec JSONs was stabilised accidentally. Within the team, we've always considered the format to be unstable and have changed it freely. This has been feasible as custom targets can only be used with core, like any other target, and so custom targets de-facto require nightly to be used (i.e. to build core manually or use Cargo's -Zbuild-std).
>
> Current build-std RFCs (https://github.com/rust-lang/rfcs/pull/3873, https://github.com/rust-lang/rfcs/pull/3874) propose a mechanism for building core on stable (at the request of Rust for Linux), which combined with a stable target-spec-json format, permit the current format to be used much more widely on stable toolchains. This would prevent us from improving the format - making it less tied to LLVM, switching to TOML, enabling keys in the spec to be stabilised individually, etc.
>
> De-stabilising the format gives us the opportunity to improve the format before it is too challenging to do so. Internal company toolchains and projects like Rust for Linux already use target-spec-json, but must use nightly at some point while doing so, so while it could be inconvenient for those users to destabilise this, it is hoped that an minimal alternative that we could choose to stabilise can be proposed relatively quickly.
2026-01-13 09:01:29 +01:00
bors
2f1bd3f378 Auto merge of #150844 - fmease:mv-ace-tests, r=BoxyUwU
mGCA: Move tests for assoc const bindings (formerly ACE) into dedicated directory & replace more mentions of ACE

Split out of PR rust-lang/rust#150843.
As discussed.

Somewhat obvious underlying principle: If the test checks basic or core parts of assoc const bindings and nothing else, move it, otherwise leave it even if it contains ACEs.

Motivation: It makes a lot easier for me to continue working on ACE efficiently.

r? @BoxyUwU
2026-01-12 20:08:40 +00:00
bors
aefa10405d Auto merge of #151003 - matthiaskrgr:rollup-wvnF9sN, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - rust-lang/rust#150861 (Folding/`ReErased` cleanups)
 - rust-lang/rust#150869 (Emit error instead of delayed bug when meeting mismatch type for const tuple)
 - rust-lang/rust#150920 (Use a hook to decouple `rustc_mir_transform` from `rustc_mir_build`)
 - rust-lang/rust#150941 (rustc_parse_format: improve diagnostics for unsupported python numeric grouping)
 - rust-lang/rust#150972 (Rename EII attributes slightly (being consistent in naming things foreign items, not extern items))
 - rust-lang/rust#150980 (Use updated indexes to build reverse map for delegation generics)
 - rust-lang/rust#150986 (std: Fix size returned by UEFI tcp4 read operations)
 - rust-lang/rust#150996 (Remove `S-waiting-on-bors` after a PR is merged)

r? @ghost
2026-01-12 16:43:20 +00:00
bors
137716908d Auto merge of #150786 - reddevilmidzy:mgca-array, r=BoxyUwU
mGCA: Support array expression as direct const arguments

tracking issue: rust-lang/rust#132980
resolve: rust-lang/rust#150612

Support array expression as direct const arguments (e. g. [1, 2, N]) in min_generic_const_args.

todo:
* [x] Rebase another mGCA PR
* [x] Add more test case
* [x] Modify clippy code
2026-01-12 13:26:21 +00:00
Matthias Krüger
db4c095147
Rollup merge of #150996 - bors-merged-label, r=jieyouxu
Remove `S-waiting-on-bors` after a PR is merged

I just noticed that we have 50k+ PRs marked as waiting on bors, even though they have been merged, lol.
2026-01-12 13:32:13 +01:00
Matthias Krüger
db5ac01aba
Rollup merge of #150986 - bishop-fix-read, r=ChrisDenton
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-12 13:32:12 +01:00
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
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
Jakub Beránek
3ca709c745
Remove S-waiting-on-bors after a PR is merged 2026-01-12 09:57:05 +01: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
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
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
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
Jana Dönszelmann
d993bd1bb1
improve eii macro by using ecx methods 2026-01-11 13:03:05 +01:00
Jonathan Brouwer
eac7bda659
Completely list all unparsed attributes 2026-01-11 12:56:00 +01:00
Jonathan Brouwer
6153fa0f88
Fix that cfg attribute was incorrectly not a parsed attribute 2026-01-11 12:12:53 +01:00
Tristan Guichaoua
d772c3d99d add freeze file times on Windows 2026-01-11 12:05:49 +01:00
Jakub Beránek
ad713ab666
Use both bors e-mails for CI postprocessing git lookup 2026-01-11 11:32:32 +01:00
Jakub Beránek
cf580b8e2b
Revert bors email to the original homu one 2026-01-11 11:32:32 +01:00
Jonathan Brouwer
f0da7832b7
Update uitests 2026-01-11 10:54:45 +01:00
Jonathan Brouwer
b5dd72d292
Port #[collapse_debuginfo] to the new attribute parsing system 2026-01-11 10:54:45 +01:00
Jakub Beránek
faea581d45
Remove references to bors2 2026-01-11 10:35:13 +01:00