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

Switch library to Rust 2021 #88638

Closed
m-ou-se opened this issue Sep 4, 2021 · 8 comments · Fixed by #92068
Closed

Switch library to Rust 2021 #88638

m-ou-se opened this issue Sep 4, 2021 · 8 comments · Fixed by #92068
Labels
A-edition-2021 Area: The 2021 edition S-blocked Status: Blocked on something else such as an RFC or other implementation work. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Comments

@m-ou-se
Copy link
Member

m-ou-se commented Sep 4, 2021

This is blocked on the beta/bootstrap compiler being updated to 1.56.

@m-ou-se m-ou-se added A-edition-2021 Area: The 2021 edition S-blocked Status: Blocked on something else such as an RFC or other implementation work. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 4, 2021
@m-ou-se
Copy link
Member Author

m-ou-se commented Sep 8, 2021

This is blocked on an issue with assert and debug_assert using the edition of libccore instead of the one who invoked it. (For assert only on Rust 2015 and 2018, for debug_assert on all editions.)

https://rust-lang.zulipchat.com/#narrow/stream/268952-edition-2021/topic/libcore.202021.20bug/near/252504325

@camelid
Copy link
Member

camelid commented Sep 18, 2021

(Note that this is blocked on #88638 (comment). The bootstrap compiler is now 1.56, so that's not a blocker.)

Manishearth added a commit to Manishearth/rust that referenced this issue Oct 7, 2021
Manishearth added a commit to Manishearth/rust that referenced this issue Oct 8, 2021
workingjubilee added a commit to workingjubilee/rustc that referenced this issue Oct 8, 2021
@rukai
Copy link
Contributor

rukai commented Dec 17, 2021

I tried setting core to 2021 and got this error:
image
Adding rustc_const_stable to panic_fmt resolved the issue but its strange that this issue didnt appear until the edition was set to 2021.

Is this another blocker? Or are we supposed to just add a rustc_const_stable?

@m-ou-se
Copy link
Member Author

m-ou-se commented Dec 17, 2021

strange that this issue didnt appear until the edition was set to 2021.

That's expected. panic!("just a string") didn't use panic_fmt in Rust 2018, but does in Rust 2021. See https://doc.rust-lang.org/edition-guide/rust-2021/panic-macro-consistency.html

@m-ou-se
Copy link
Member Author

m-ou-se commented Dec 17, 2021

@rust-lang/wg-const-eval: Looks like the "const-stable functions can only call other const-stable functions" check doesn't play well with #[rustc_do_not_const_check].

@fee1-dead
Copy link
Member

@rustbot claim

@m-ou-se
Copy link
Member Author

m-ou-se commented Dec 17, 2021

@fee1-dead what part are you claiming? The migration of core is blocked on the const check, and the migration of std is already in progress in #92030.

@fee1-dead
Copy link
Member

I will fix the const check. And since this is a tracking issue I will unclaim. Sorry for the confusion

@fee1-dead fee1-dead removed their assignment Dec 17, 2021
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Dec 18, 2021
Update stdlib to the 2021 edition

progress towards rust-lang#88638

I couldnt find a way to run the 2018 style panic tests against 2018 so I just deleted them, maybe theres a way to do it that I missed though?
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Dec 18, 2021
Update stdlib to the 2021 edition

progress towards rust-lang#88638

I couldnt find a way to run the 2018 style panic tests against 2018 so I just deleted them, maybe theres a way to do it that I missed though?
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Dec 18, 2021
Update stdlib to the 2021 edition

progress towards rust-lang#88638

I couldnt find a way to run the 2018 style panic tests against 2018 so I just deleted them, maybe theres a way to do it that I missed though?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-edition-2021 Area: The 2021 edition S-blocked Status: Blocked on something else such as an RFC or other implementation work. 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.

4 participants