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

Don't newly-stabilize already-deprecated ATOMIC_I64_INIT & friends in 1.34 #58089

Closed
scottmcm opened this issue Feb 3, 2019 · 5 comments
Closed
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Milestone

Comments

@scottmcm
Copy link
Member

scottmcm commented Feb 3, 2019

@macpp pointed out in #32976 (comment) that 1.34 is about to stabilize some consts that are already deprecated: https://doc.rust-lang.org/nightly/std/sync/atomic/constant.ATOMIC_I64_INIT.html (Note that it's both "stable since 1.34" and "deprecated since 1.34".)

That seems like something that should probably be addressed in the next 3 weeks.

@scottmcm scottmcm added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Feb 3, 2019
@scottmcm
Copy link
Member Author

scottmcm commented Feb 3, 2019

cc @alexcrichton because of #57425

Any thoughts on what change, if any, would be right here?

@SimonSapin
Copy link
Contributor

These constants have been deprecated for about a month since #57425. I think we should unstabilize them, and remove them after some deprecation period. I don’t have a strong opinion on whether this month so far is a long enough period. In that case we can simply remove them now.

@alexcrichton
Copy link
Member

It looks like these are only stable on nightly so I think it's fine to just remove the constants at any time before they hit stable.

@Mark-Simulacrum Mark-Simulacrum added the E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. label Feb 13, 2019
@Mark-Simulacrum Mark-Simulacrum added this to the 1.34 milestone Feb 13, 2019
@saleemjaffer
Copy link
Contributor

@scottmcm I would like to take a shot at this. I'm a newbie to rust.

@SimonSapin
Copy link
Contributor

@saleemjaffer Go ahead!  See https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#pull-requests for the PR workflow.

In this case, the issue is about partly reverting the changes in https://github.com/rust-lang/rust/pull/57425/files. The relevant code is in libcore/sync/atomic.rs in the macro that generates constants whose name are given through the $atomic_init macro parameter. The stability attribute of those const items should be reverted to unstable(feature = "integer_atomics", issue = "32976"). This probably involves adding a new $stable_init_const:meta parameter to the macro, among the existing $stable_* parameters.

Note however that only those constants that are stable since 1.34.0 can be reverted to unstable, since that version has not shipped yet.

bors added a commit that referenced this issue Feb 22, 2019
…tegers, r=dtolnay

Destabilize fixed-width const defined atomic integers

With this PR version 1.34.0 onwards const declarations of atomic integers will be unstable.

* Closes #58089
* Reverts partially: #57425
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. 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

5 participants