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

rustdoc or cargo doc should pass a special --cfg doc flag #834

Closed
wants to merge 2 commits into from

Conversation

kennytm
Copy link
Member

@kennytm kennytm commented Feb 12, 2015


# Alternatives

* The identifier `rustdoc` can be changed to something else.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should just be doc. rustdoc sounds specific to the rustdoc tool itself, and so if someone made another documentation tool for Rust called something else, the rustdoc cfg attr wouldn’t really make much sense any more. A generic doc cfg sounds much more general.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, doc sounds better to me.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 on doc.

@kennytm kennytm changed the title rustdoc or cargo doc should pass a special --cfg rustdoc flag rustdoc or cargo doc should pass a special --cfg doc flag Feb 13, 2015
@nrc
Copy link
Member

nrc commented Feb 27, 2015

This is probably a good idea for us to do. However, now is not the time - we are very close to the 1.0 release and this is neither urgent nor has backwards compatibility hazards. Therefore we decided it should be closed as postponed. I created #915 to track this issue for now.

@nrc nrc closed this Feb 27, 2015
@nrc nrc added the postponed RFCs that have been postponed and may be revisited at a later time. label Feb 27, 2015
@lambda-fairy
Copy link
Contributor

Should we re-open this RFC?

The proposal seems pretty straightforward, and we're already in the 1.6 cycle.

@nodakai
Copy link

nodakai commented Apr 1, 2016

Ping?

@mitaa
Copy link

mitaa commented Apr 1, 2016

I think this is a good idea, but this also means that there must not be any compile errors from any of the #[cfg(doc)]'d items (I imagine this might be a problem, requiring workarounds like dummy items?).

cc rust-lang/rust#1998

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
postponed RFCs that have been postponed and may be revisited at a later time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants