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

fix(linux): fix warnings from unexpected_cfgs lint on nightly #1280

Merged
merged 1 commit into from
May 30, 2024

Commits on May 30, 2024

  1. fix(linux): fix warnings from unexpected_cfgs lint on nightly

    Recently nightly `rustc` enabled `unexpected_cfgs` lint by default.
    Since this project uses non-standard cfg names, they started to cause
    warnings like below on Linux:
    
    ```
    warning: unexpected `cfg` condition name: `gtk`
        --> src/lib.rs:1029:17
         |
    1029 |       #[cfg(not(gtk))]
         |                 ^^^
         |
         = help: consider using a Cargo feature instead
         = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
                  [lints.rust]
                  unexpected_cfgs = { level = "warn", check-cfg = ['cfg(gtk)'] }
         = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(gtk)");` to the top of the `build.rs`
         = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
    ```
    
    Ref: rust-lang/rust#82450
    
    Signed-off-by: rhysd <lin90162@yahoo.co.jp>
    rhysd committed May 30, 2024
    Configuration menu
    Copy the full SHA
    3b6f1f7 View commit details
    Browse the repository at this point in the history