Skip to content

Reference doc on cfg does not cover cfg(feature = "...") #21

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
steveklabnik opened this issue Mar 23, 2017 · 1 comment · Fixed by #833
Closed

Reference doc on cfg does not cover cfg(feature = "...") #21

steveklabnik opened this issue Mar 23, 2017 · 1 comment · Fixed by #833
Labels
A-attributes Area: Attributes Easy We believe this would not be difficult to actually fix New Content Missing features or aspects of language not currently documented.

Comments

@steveklabnik
Copy link
Member

Migrated from rust-lang/rust#34803


Rust appears to support #[cfg(feature = "foo")] to control optional features: Cargo doc.

The Rust reference on cfg does not mention feature: nightly doc.

@Havvy Havvy added the Enhancement Improvement in a non-prose section of the book label Sep 24, 2017
@Havvy
Copy link
Contributor

Havvy commented Sep 24, 2017

The conditional compilation section needs to add the feature cfg variant. They are used mostly by cargo and there isn't a language feature for turning on and off features, so would have to say something like "The compiler decides which features are enabled and which aren't." But that wording won't work because "the compiler" currently means rustc always.

@Havvy Havvy added Easy We believe this would not be difficult to actually fix New Content Missing features or aspects of language not currently documented. and removed Enhancement Improvement in a non-prose section of the book labels Sep 28, 2017
@ehuss ehuss added the A-attributes Area: Attributes label Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes Easy We believe this would not be difficult to actually fix New Content Missing features or aspects of language not currently documented.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants