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

Draft
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

(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: x86_64-mingw-1
try-job: x86_64-msvc-1
try-job: x86_64-msvc-ext1
try-job: x86_64-msvc-ext3

@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 d5db9948be8ef00a4525ae10add3f9f79e9c3d27...

@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 fc2f6df187740a61ca2241b22b3748ae663a2e2d...

@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 4758198d7efd16e1e2e77180e300780b6b3eb881...

@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 9, 2025

Posted #138248 with the current blocker here.

@@ -1064,7 +1064,7 @@ mod move_keyword {}
/// ```rust,compile_fail,E0502
/// let mut v = vec![0, 1];
/// let mut_ref_v = &mut v;
/// ##[allow(unused)]
/// # #[allow(unused)]
Copy link
Member

Choose a reason for hiding this comment

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

What is this ## -> # #?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a workaround for #136899. Sorry, should have mentioned that in the description.

ehuss added 6 commits March 10, 2025 14:51
When migrating the standard library to 2024, there will be some behavior
changes that users will be able to observe. This test should cover that
(I cannot think of any other observable differences).
@ehuss
Copy link
Contributor Author

ehuss commented Mar 10, 2025

@bors try

@bors
Copy link
Contributor

bors commented Mar 10, 2025

⌛ Trying commit 06375b3 with merge ee3f9ef...

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 10, 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-mingw-1
try-job: x86_64-mingw-2
try-job: x86_64-msvc-1
try-job: x86_64-msvc-ext1
try-job: x86_64-msvc-ext3
Comment on lines -56 to +61
StorageDead(_8);
StorageDead(_5);
StorageDead(_2);
StorageDead(_10);
StorageDead(_8);
StorageDead(_7);
StorageDead(_5);
StorageDead(_4);
StorageDead(_2);
Copy link
Member

Choose a reason for hiding this comment

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

This is obviously not the main point of e2024, but it's fun to see that these just end up in decreasing order now. It obviously doesn't actually matter, but it's a nice indication that how the temporaries are getting cleaned up really is in a more reasonable order.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Mar 11, 2025

💔 Test failed - checks-actions

@ehuss
Copy link
Contributor Author

ehuss commented Mar 11, 2025

@bors try

@bors
Copy link
Contributor

bors commented Mar 11, 2025

⌛ Trying commit 0b5c62e with merge aeb900d...

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 11, 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: x86_64-mingw-1
try-job: x86_64-msvc-1
try-job: x86_64-msvc-ext1
try-job: x86_64-msvc-ext3
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 S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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
7 participants