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

Should core import the 2021 prelude? #122912

Closed
dpaoliello opened this issue Mar 22, 2024 · 2 comments · Fixed by #123042
Closed

Should core import the 2021 prelude? #122912

dpaoliello opened this issue Mar 22, 2024 · 2 comments · Fixed by #123042
Assignees
Labels
C-discussion Category: Discussion or questions that doesn't represent real issues. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Comments

@dpaoliello
Copy link
Contributor

dpaoliello commented Mar 22, 2024

The core crate currently imports the v1 prelude

#[prelude_import]
#[allow(unused)]
use prelude::v1::*;

This recently caused an issue when updating the portable-simd subtree since it was using a trait that was added to the 2021 prelude: #122905 (comment)

Given that core is currently being built as 2021, should it import the 2021 prelude?

cc @workingjubilee @calebzulawski

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 22, 2024
@workingjubilee workingjubilee added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Mar 22, 2024
@jieyouxu jieyouxu added the C-discussion Category: Discussion or questions that doesn't represent real issues. label Mar 23, 2024
@Noratrieb
Copy link
Member

sounds reasonable

@Noratrieb Noratrieb removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 24, 2024
@dpaoliello
Copy link
Contributor Author

Happy to take care of this.
Do we have a guide or docs on updating the edition that the standard library builds with? Seems like it'd be good to add this as an item to do.

@rustbot claim

workingjubilee added a commit to workingjubilee/rustc that referenced this issue Mar 25, 2024
Import the 2021 prelude in the core crate

The `core` crate currently imports the v1 prelude
https://github.com/rust-lang/rust/blob/b3df0d7e5ef5f7dbeeca3fb289c65680ad013f87/library/core/src/lib.rs#L285-L287

This recently caused an issue when updating the `portable-simd` subtree since it was using a trait that was added to the 2021 prelude: rust-lang#122905 (comment)

To make it easier to have a consistent build environment for subtrees and submodules that get included in `core`, we will now import the 2021 prelude into `core`.

Fixes rust-lang#122912

r? `@Nilstrieb`
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Mar 26, 2024
Rollup merge of rust-lang#123042 - dpaoliello:prelude, r=Nilstrieb

Import the 2021 prelude in the core crate

The `core` crate currently imports the v1 prelude
https://github.com/rust-lang/rust/blob/b3df0d7e5ef5f7dbeeca3fb289c65680ad013f87/library/core/src/lib.rs#L285-L287

This recently caused an issue when updating the `portable-simd` subtree since it was using a trait that was added to the 2021 prelude: rust-lang#122905 (comment)

To make it easier to have a consistent build environment for subtrees and submodules that get included in `core`, we will now import the 2021 prelude into `core`.

Fixes rust-lang#122912

r? `@Nilstrieb`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-discussion Category: Discussion or questions that doesn't represent real issues. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants