Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the standard library to Rust 2024 #138162

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Mar 7, 2025

This updates the standard library to Rust 2024. This includes the following notable changes:

  • Macros are updated to use new expression fragment specifiers. This PR includes a test to illustrate the changes, primarily allowing const {...} expressions now.
  • Some tests show a change in MIR drop order. We do not believe this will be an observable change (see zulip discussion).

Fixes #133081

@rustbot
Copy link
Collaborator

rustbot commented Mar 7, 2025

r? @BoxyUwU

rustbot has assigned @BoxyUwU.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 7, 2025
@ehuss
Copy link
Contributor Author

ehuss commented Mar 7, 2025

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 7, 2025
Update the standard library to Rust 2024

This updates the standard library to Rust 2024. This includes the following notable changes:

- Macros are updated to use new expression fragment specifiers. This PR includes a test to illustrate the changes, primarily allowing `const {...}` expressions now.
- Some tests show a change in MIR drop order. We do not believe this will be an observable change ([see zulip discussion](https://rust-lang.zulipchat.com/#narrow/channel/268952-edition/topic/standard.20library.20migration/near/500972873)).

Fixes rust-lang#133081

(Draft while I do some try jobs, as this is a high-risk of breakage.)

try-job: aarch64-apple
try-job: aarch64-gnu
try-job: arm-android
try-job: armhf-gnu
try-job: dist-aarch64-apple
try-job: dist-aarch64-linux
try-job: dist-aarch64-msvc
try-job: dist-android
try-job: dist-apple-various
try-job: dist-arm-linux
try-job: dist-armhf-linux
try-job: dist-armv7-linux
try-job: dist-i586-gnu-i586-i686-musl
try-job: dist-i686-linux
try-job: dist-i686-mingw
try-job: dist-i686-msvc
try-job: dist-loongarch64-linux
try-job: dist-loongarch64-musl
try-job: dist-ohos
try-job: dist-powerpc-linux
@bors
Copy link
Contributor

bors commented Mar 7, 2025

⌛ Trying commit fab07c3 with merge a525bde...

@bors
Copy link
Contributor

bors commented Mar 7, 2025

☀️ Try build successful - checks-actions
Build commit: a525bde (a525bde7d4aebdcc7c7ebf678404cbaf6245a0c2)

@ehuss
Copy link
Contributor Author

ehuss commented Mar 7, 2025

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 7, 2025
Update the standard library to Rust 2024

This updates the standard library to Rust 2024. This includes the following notable changes:

- Macros are updated to use new expression fragment specifiers. This PR includes a test to illustrate the changes, primarily allowing `const {...}` expressions now.
- Some tests show a change in MIR drop order. We do not believe this will be an observable change ([see zulip discussion](https://rust-lang.zulipchat.com/#narrow/channel/268952-edition/topic/standard.20library.20migration/near/500972873)).

Fixes rust-lang#133081

(Draft while I do some try jobs, as this is a high-risk of breakage.)

try-job: dist-powerpc64-linux
try-job: dist-powerpc64le-linux
try-job: dist-riscv64-linux
try-job: dist-s390x-linux
try-job: dist-various-1
try-job: dist-various-2
try-job: dist-x86_64-apple
try-job: dist-x86_64-freebsd
try-job: dist-x86_64-illumos
try-job: dist-x86_64-linux
try-job: dist-x86_64-mingw
try-job: dist-x86_64-msvc
try-job: dist-x86_64-musl
try-job: dist-x86_64-netbsd
try-job: i686-gnu-1
try-job: i686-gnu-2
try-job: i686-mingw-1
try-job: i686-mingw-2
try-job: i686-mingw-3
try-job: i686-msvc-1
@bors
Copy link
Contributor

bors commented Mar 7, 2025

⌛ Trying commit fab07c3 with merge d5db994...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Mar 8, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 8, 2025
@bors
Copy link
Contributor

bors commented Mar 8, 2025

☔ The latest upstream changes (presumably #138208) made this pull request unmergeable. Please resolve the merge conflicts.

@ehuss ehuss force-pushed the library-2024 branch 2 times, most recently from 2df2508 to 39d5d92 Compare March 8, 2025 18:55
@rustbot rustbot added the O-windows Operating system: Windows label Mar 8, 2025
@ehuss
Copy link
Contributor Author

ehuss commented Mar 8, 2025

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 8, 2025
Update the standard library to Rust 2024

This updates the standard library to Rust 2024. This includes the following notable changes:

- Macros are updated to use new expression fragment specifiers. This PR includes a test to illustrate the changes, primarily allowing `const {...}` expressions now.
- Some tests show a change in MIR drop order. We do not believe this will be an observable change ([see zulip discussion](https://rust-lang.zulipchat.com/#narrow/channel/268952-edition/topic/standard.20library.20migration/near/500972873)).

Fixes rust-lang#133081

(Draft while I do some try jobs, as this is a high-risk of breakage.)

try-job: dist-powerpc64le-linux
try-job: i686-gnu-1
try-job: i686-msvc-1
try-job: i686-msvc-2
try-job: mingw-check
try-job: test-various
try-job: x86_64-apple-1
try-job: x86_64-apple-2
try-job: x86_64-fuchsia
try-job: x86_64-gnu-distcheck
try-job: x86_64-gnu-tools
try-job: x86_64-mingw-1
try-job: x86_64-mingw-2
try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
try-job: x86_64-msvc-ext1
try-job: x86_64-msvc-ext2
try-job: x86_64-msvc-ext3
try-job: x86_64-rust-for-linux
@bors
Copy link
Contributor

bors commented Mar 8, 2025

⌛ Trying commit 39d5d92 with merge fc2f6df...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Mar 8, 2025

💔 Test failed - checks-actions

@ehuss
Copy link
Contributor Author

ehuss commented Mar 8, 2025

@bors try

(weird random stack overflow in x86_64-mingw-1)

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 8, 2025
Update the standard library to Rust 2024

This updates the standard library to Rust 2024. This includes the following notable changes:

- Macros are updated to use new expression fragment specifiers. This PR includes a test to illustrate the changes, primarily allowing `const {...}` expressions now.
- Some tests show a change in MIR drop order. We do not believe this will be an observable change ([see zulip discussion](https://rust-lang.zulipchat.com/#narrow/channel/268952-edition/topic/standard.20library.20migration/near/500972873)).

Fixes rust-lang#133081

(Draft while I do some try jobs, as this is a high-risk of breakage.)

try-job: dist-powerpc64le-linux
try-job: i686-gnu-1
try-job: i686-msvc-1
try-job: i686-msvc-2
try-job: x86_64-apple-1
try-job: x86_64-gnu-tools
try-job: x86_64-mingw-1
try-job: x86_64-mingw-2
try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
try-job: x86_64-msvc-ext1
try-job: x86_64-msvc-ext2
try-job: x86_64-msvc-ext3
@bors
Copy link
Contributor

bors commented Mar 8, 2025

⌛ Trying commit 39d5d92 with merge 4758198...

@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 11, 2025
Comment on lines 1 to 2
// Tests a small handful of macros in the standard library how they handle the
// new behavior introduced in 2024.
Copy link
Member

@jieyouxu jieyouxu Mar 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: maybe slightly elaborate what said "new behavior" is? Like the PR description bit

Macros are updated to use new expression fragment specifiers. This PR includes a test to illustrate the changes, primarily allowing const {...} expressions now.

but added to the test comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure!

@jieyouxu
Copy link
Member

This is mostly library changes, so probably makes more sense to...

r? libs

@rustbot rustbot assigned cuviper and unassigned BoxyUwU Mar 11, 2025
@cuviper
Copy link
Member

cuviper commented Mar 11, 2025

cc @rust-lang/libs-api for the macro :expr upgrade -- while I understand the need for an edition boundary, I think this perfectly safe for macros we control, and should be a strict upgrade. Feel free to take API control of the review if needed, otherwise it looks good to me!

@rustbot label +relnotes
@bors r+

@bors
Copy link
Contributor

bors commented Mar 11, 2025

📌 Commit b130747 has been approved by cuviper

It is now in the queue for this repository.

@rustbot rustbot added the relnotes Marks issues that should be documented in the release notes of the next release. label Mar 11, 2025
@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 11, 2025
jieyouxu added a commit to jieyouxu/rust that referenced this pull request Mar 12, 2025
Update the standard library to Rust 2024

This updates the standard library to Rust 2024. This includes the following notable changes:

- Macros are updated to use new expression fragment specifiers. This PR includes a test to illustrate the changes, primarily allowing `const {...}` expressions now.
- Some tests show a change in MIR drop order. We do not believe this will be an observable change ([see zulip discussion](https://rust-lang.zulipchat.com/#narrow/channel/268952-edition/topic/standard.20library.20migration/near/500972873)).

Fixes rust-lang#133081
jieyouxu added a commit to jieyouxu/rust that referenced this pull request Mar 12, 2025
Update the standard library to Rust 2024

This updates the standard library to Rust 2024. This includes the following notable changes:

- Macros are updated to use new expression fragment specifiers. This PR includes a test to illustrate the changes, primarily allowing `const {...}` expressions now.
- Some tests show a change in MIR drop order. We do not believe this will be an observable change ([see zulip discussion](https://rust-lang.zulipchat.com/#narrow/channel/268952-edition/topic/standard.20library.20migration/near/500972873)).

Fixes rust-lang#133081
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 12, 2025
Rollup of 25 pull requests

Successful merges:

 - rust-lang#134076 (Stabilize `std::io::ErrorKind::InvalidFilename`)
 - rust-lang#136842 (Add libstd support for Trusty targets)
 - rust-lang#137314 (change definitely unproductive cycles to error)
 - rust-lang#137504 (Move methods from Map to TyCtxt, part 4.)
 - rust-lang#137621 (Add std support to cygwin target)
 - rust-lang#137701 (Convert `ShardedHashMap` to use `hashbrown::HashTable`)
 - rust-lang#138109 (make precise capturing args in rustdoc Json typed)
 - rust-lang#138161 (Add PeekMut::refresh)
 - rust-lang#138162 (Update the standard library to Rust 2024)
 - rust-lang#138174 (Elaborate trait assumption in `receiver_is_dispatchable`)
 - rust-lang#138175 (Support rmeta inputs for --crate-type=bin --emit=obj)
 - rust-lang#138269 (uefi: fs: Implement FileType, FilePermissions and FileAttr)
 - rust-lang#138313 (Update books)
 - rust-lang#138318 (Rustdoc: remove a bunch of `@ts-expect-error` from main.js)
 - rust-lang#138331 (Use `RUSTC_LINT_FLAGS` more)
 - rust-lang#138333 (Rebuild llvm spuriously less frequently)
 - rust-lang#138343 (Enable `f16` tests for `powf`)
 - rust-lang#138345 (Some autodiff cleanups)
 - rust-lang#138346 (naked functions: on windows emit `.endef` without the symbol name)
 - rust-lang#138347 (Reduce `kw::Empty` usage, part 2)
 - rust-lang#138360 (Fix false-positive in `expr_or_init` and in the `invalid_from_utf8` lint)
 - rust-lang#138371 (Update compiletest's `has_asm_support` to match rustc)
 - rust-lang#138372 (Refactor `pick2_mut` & `pick3_mut` to use `get_disjoint_mut`)
 - rust-lang#138376 (Item-related cleanups)
 - rust-lang#138377 (Remove unnecessary lifetime from `PatInfo`.)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs O-windows Operating system: Windows relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

assert_eq! fails with const { .. } in Rust 2024
9 participants