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

Make cfg imply doc(cfg) #79341

Closed
wants to merge 5 commits into from
Closed

Commits on Apr 26, 2021

  1. Make cfg implicitly imply doc(cfg)

    This is only active when the `doc_cfg` feature is active.
    
    The implicit cfg can be overridden via #[doc(cfg(...))], so e.g. to
    hide a #[cfg] you can use something like:
    
    ```rust
     #[cfg(unix)]
     #[doc(cfg(all()))]
    pub struct Unix;
    ```
    
    (since `all()` is always true, it is never shown in the docs)
    Nemo157 authored and jyn514 committed Apr 26, 2021
    Configuration menu
    Copy the full SHA
    85ec783 View commit details
    Browse the repository at this point in the history
  2. Allow adding a set of cfg's to hide from being implicitly doc(cfg)'d

    By adding #![doc(cfg_hide(foobar))] to the crate attributes the cfg
     #[cfg(foobar)] (and _only_ that _exact_ cfg) will not be implicitly
    treated as a doc(cfg) to render a message in the documentation.
    Nemo157 authored and jyn514 committed Apr 26, 2021
    Configuration menu
    Copy the full SHA
    74d0d3f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e0c438f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    28500e7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0225d97 View commit details
    Browse the repository at this point in the history