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

members of ::std::u128 module must not be stable #38860

Closed
est31 opened this issue Jan 6, 2017 · 5 comments
Closed

members of ::std::u128 module must not be stable #38860

est31 opened this issue Jan 6, 2017 · 5 comments
Labels
T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@est31
Copy link
Member

est31 commented Jan 6, 2017

Seems that #38482, while correctly making use ::std::u128; unstable, accidentally made the members of that module stable. This must not happen, and it may not leak to stable/beta. E.g. this compiles : println!("{}", ::std::u128::MAX);.

cc #35118 (tracking issue)
cc @nagisa

@alexcrichton alexcrichton added I-nominated T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Jan 6, 2017
@nagisa
Copy link
Member

nagisa commented Jan 6, 2017

Adding #![unstable(...)] on top of these modules should be sufficient, right? Why is that not the case then?

There’s even a

#[unstable(feature = "i128", issue = "35118")]
#[cfg(not(stage0))]
pub use core::i128;

in libstd/lib.rs…

@est31
Copy link
Member Author

est31 commented Jan 6, 2017

Adding #![unstable(...)] on top of these modules should be sufficient, right?

seems this only makes use ::std::u128 fail compilation, but not the example above.

@est31 est31 changed the title ::std::u128 must not be stable members of ::std::u128 module must not be stable Jan 6, 2017
@est31
Copy link
Member Author

est31 commented Jan 6, 2017

Edited the issue description to contain the new findings.

@ollie27
Copy link
Member

ollie27 commented Jan 6, 2017

Looks like int_module! and uint_module! need to take a stability attribute as an argument.

@est31
Copy link
Member Author

est31 commented Jan 6, 2017

See #38861 . Don't tell bors anything about it yet, I haven't run the test yet. EDIT: I've run it, it works. Ready for review.

est31 added a commit to est31/rust that referenced this issue Jan 6, 2017
Adding it in a stable form was an accident.
It thankfully only leaked to nightly.

Fixes rust-lang#38860
bors added a commit that referenced this issue Jan 8, 2017
Make members of {std,core}::{i128,u128} unstable

Fixes #38860
frewsxcv pushed a commit to frewsxcv/rust that referenced this issue Jan 9, 2017
Adding it in a stable form was an accident.
It thankfully only leaked to nightly.

Fixes rust-lang#38860
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants