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

Ability to enable unstable feature in tests #18

Closed
Frago9876543210 opened this issue Aug 10, 2020 · 5 comments
Closed

Ability to enable unstable feature in tests #18

Frago9876543210 opened this issue Aug 10, 2020 · 5 comments

Comments

@Frago9876543210
Copy link

tests.rs

#[rustversion::attr(nightly, feature(arbitrary_enum_discriminant))]

mod something;
error[E0658]: discriminants on non-unit variants are experimental
 --> tests/derive/enums/regular_enum.rs:9:9
  |
9 |     } = 0xde,
  |         ^^^^
  |
  = note: see issue #60553 <https://github.com/rust-lang/rust/issues/60553> for more information
  = help: add `#![feature(arbitrary_enum_discriminant)]` to the crate attributes to enable

error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.
error: could not compile `endiannezz`.

To learn more, run the command again with --verbose.
@taiki-e
Copy link

taiki-e commented Sep 22, 2020

inner attribute (#![...]) is needed to enable unstable features. and the ability to use user-defined attributes as inner attributes is not yet stable and probably does not work at this time.

I'd recommend using a build script instead: #8 (comment)

@dtolnay
Copy link
Owner

dtolnay commented Oct 20, 2022

I'll close this in favor of rust-lang/rust#54726, since the required work here is in rustc, not this crate.

If there end up being changes required based on how that issue plays out, we can reopen an issue.

@dtolnay dtolnay closed this as completed Oct 20, 2022
@peter-lyons-kehl
Copy link

See also #8.

@wmmc88
Copy link

wmmc88 commented Nov 6, 2023

I'll close this in favor of rust-lang/rust#60553, since the required work here is in rustc, not this crate.

If there end up being changes required based on how that issue plays out, we can reopen an issue.

The linked issue is closed, but is that the right one? Seems like this would be blocked on rust-lang/rust#54726

@dtolnay
Copy link
Owner

dtolnay commented Nov 6, 2023

You're right. Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants