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

docs: Annotate with required features #2842

Closed
wants to merge 1 commit into from
Closed

Conversation

epage
Copy link
Member

@epage epage commented Oct 9, 2021

This is requiring a nightly feature. iirc docs.rs uses nightly, so this should be work so long as it doesn't change too much on us.

The tracking issue is rust-lang/rust#43781

@epage epage mentioned this pull request Oct 9, 2021
@pksunkara
Copy link
Member

pksunkara commented Oct 9, 2021

As I said in the PR, rust-lang/rust#89596 auto does it and we don't need these attributes. All we need is feature(doc_cfg) in src/lib.rs.

@@ -105,6 +105,7 @@ unicode = ["textwrap/unicode-width", "unicase"] # Support for unicode character
# Optional
wrap_help = ["terminal_size", "textwrap/terminal_size"]
yaml = ["yaml-rust"]
nightly = []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename this feature to doc which is more meaningful and which is what we used to do before to use some nightly doc features.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imo the name should make clear it requires the nightly toolchain. I also don't see a reason for us to restrict this flag to jsut docs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about nightly-doc? We want to differentiate between the features for docs.rs and actual features (if we have any).

@epage
Copy link
Member Author

epage commented Oct 9, 2021

As I said in the PR, rust-lang/rust#89596 auto does it and we don't need these attributes. All we need is feature(doc_cfg) in src/lib.rs.

That was merged two days ago, so it depends on what our release timelines are.

@pksunkara
Copy link
Member

That was merged two days ago, so it depends on what our release timelines are.

Just tested, already working.

@epage
Copy link
Member Author

epage commented Oct 10, 2021

Just tested, already working.'

You are right, docs.rs uses nightly which we were also taking advantage of in this PR.

@epage epage closed this Oct 10, 2021
@epage epage deleted the feature branch October 10, 2021 00:20
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

Successfully merging this pull request may close these issues.

2 participants