Questions tagged [crate-features]

1 questions
1
vote
1 answer

What are the consequences of a feature-gated enum variant?

What if a library crate defines an enum that has a variant that is feature-gated? #[non_exhaustive] enum Foo { A, B, #[cfg(feature = "some-feature")] Gated, } This is a naïve attempt to allow the enum Foo to support the optional…
RBF06
  • 2,013
  • 2
  • 21
  • 20