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

Broaden scope of suppressed warnings for listings without a main fn #1195

Merged

Commits on Apr 18, 2020

  1. Broaden scope of suppressed warnings for listings without a main fn

    At present, code listings without a main function will be wrapped in one and
    annotated with an allow lint check attribute provided by the following [code][]:
    
    ```
    format!(
        "\n# #![allow(unused_variables)]\n{}#fn main() {{\n{}#}}",
        attrs, code
    )
    ```
    
    A broader lint check attribute such as `#![allow(unused)]` seems like it might
    better fit the apparent intent of this code.
    
    Addresses: rust-lang#1192
    
    [code]: https://github.com/rust-lang/mdBook/blob/769cc0a7c14fe133fc5eb223f435473730d0086e/src/renderer/html_handlebars/hbs_renderer.rs#L635-L638
    englishm committed Apr 18, 2020
    Configuration menu
    Copy the full SHA
    1d265fd View commit details
    Browse the repository at this point in the history