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

codegen/enum: Do not generate doc(cfg) on match arms #994

Merged
merged 4 commits into from
Nov 19, 2020

Commits on Nov 18, 2020

  1. Configuration menu
    Copy the full SHA
    96e7191 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    11df668 View commit details
    Browse the repository at this point in the history
  3. codegen/enum: Do not generate doc(cfg) on match arms

        warning: unused doc comment
        --> gstreamer/src/auto/enums.rs:761:41
            |
        761 |             #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
            |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        762 |             66817 => EventType::InstantRateSyncTime,
            |             --------------------------------------- rustdoc does not generate documentation for match arms
    
    Fixes: c63d1fa ("Generate doc cfg attributes for more beautiful docs")
    MarijnS95 committed Nov 18, 2020
    Configuration menu
    Copy the full SHA
    a0a3096 View commit details
    Browse the repository at this point in the history
  4. codegen/object: Do not generate doc(cfg()) on expressions

    Solves warnings of the following kind in gtk-rs:
    
        warning: unused doc comment
           --> gtk/src/auto/window.rs:309:37
            |
        309 |           #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))]
            |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        310 | /         {
        311 | |             if let Some(ref focus_on_click) = self.focus_on_click {
        312 | |                 properties.push(("focus-on-click", focus_on_click));
        313 | |             }
        314 | |         }
            | |_________- rustdoc does not generate documentation for expressions
    
    Also remove the surrounding expression block and convoluted indentation
    logic: if {} is also an expression block that can take attributes.
    MarijnS95 committed Nov 18, 2020
    Configuration menu
    Copy the full SHA
    c9c638f View commit details
    Browse the repository at this point in the history