Skip to content

The "future_atomic_orderings" feature is broken. #53391

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

Closed
lachlansneff opened this issue Aug 15, 2018 · 2 comments
Closed

The "future_atomic_orderings" feature is broken. #53391

lachlansneff opened this issue Aug 15, 2018 · 2 comments
Assignees
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) C-bug Category: This is a bug.

Comments

@lachlansneff
Copy link

Compiling code that matches against core::sync::atomic::Ordering requires the future_atomic_orderings feature to be enabled. But, when I enable that feature, I get

error[E0635]: unknown feature `future_atomic_orderings`
  --> src/main.rs:33:5
   |
33 |     future_atomic_orderings,
   |     ^^^^^^^^^^^^^^^^^^^^^^^
@varkor varkor self-assigned this Aug 15, 2018
@varkor
Copy link
Member

varkor commented Aug 15, 2018

This is a bug with the feature collector; thanks for reporting!

Not that in this case specifically, it shouldn't be a problem anyway. You can match over all variants of core::sync::atomic::Ordering except for Ordering::__Nonexhaustive. This is specifically hidden so that you don't try to exhaustively match the enum. You should be using a catch-all _ arm instead.

Really, Ordering should be using #[non_exhaustive] instead.

@varkor varkor added C-bug Category: This is a bug. A-attributes Area: Attributes (`#[…]`, `#![…]`) labels Aug 15, 2018
@lachlansneff
Copy link
Author

Yeah, that's how I'm sidestepping this bug for now, but actually, the code in libcore does match against the __Nonexhaustive case, which I was largely copying.

bors added a commit that referenced this issue Aug 16, 2018
…omatsakis

Visit all attributes for feature collection

Previously feature attributes were just collected on item-like "things" as well as exported macros and crate attributes. This ignored some places feature attributes could be specified, such as on enum variants.

Fixes #53391.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants