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

Resolve unexpected_cfgs warning #318

Merged
merged 1 commit into from
May 7, 2024
Merged

Resolve unexpected_cfgs warning #318

merged 1 commit into from
May 7, 2024

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented May 7, 2024

    warning: unexpected `cfg` condition name: `doc_cfg`
      --> src/lib.rs:64:13
       |
    64 | #![cfg_attr(doc_cfg, feature(doc_cfg))]
       |             ^^^^^^^
       |
       = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
       = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs`
       = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
       = note: `#[warn(unexpected_cfgs)]` on by default

    warning: unexpected `cfg` condition name: `no_alloc_crate`
      --> src/lib.rs:65:43
       |
    65 | #![cfg_attr(all(not(feature = "std"), not(no_alloc_crate)), no_std)]
       |                                           ^^^^^^^^^^^^^^
       |
       = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(no_alloc_crate)");` to the top of the `build.rs`
       = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `no_unsafe_op_in_unsafe_fn_lint`
      --> src/lib.rs:66:17
       |
    66 | #![cfg_attr(not(no_unsafe_op_in_unsafe_fn_lint), deny(unsafe_op_in_unsafe_fn))]
       |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(no_unsafe_op_in_unsafe_fn_lint)");` to the top of the `build.rs`
       = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `no_unsafe_op_in_unsafe_fn_lint`
      --> src/lib.rs:67:13
       |
    67 | #![cfg_attr(no_unsafe_op_in_unsafe_fn_lint, allow(unused_unsafe))]
       |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(no_unsafe_op_in_unsafe_fn_lint)");` to the top of the `build.rs`
       = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `no_str_strip_prefix`
      --> src/lib.rs:68:13
       |
    68 | #![cfg_attr(no_str_strip_prefix, allow(unstable_name_collisions))]
       |             ^^^^^^^^^^^^^^^^^^^
       |
       = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(no_str_strip_prefix)");` to the top of the `build.rs`
       = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `no_alloc_crate`
      --> src/lib.rs:89:11
       |
    89 | #[cfg(not(no_alloc_crate))]
       |           ^^^^^^^^^^^^^^
       |
       = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(no_alloc_crate)");` to the top of the `build.rs`
       = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `no_const_vec_new`
       --> src/lib.rs:188:12
        |
    188 | #[cfg_attr(no_const_vec_new, derive(Default))]
        |            ^^^^^^^^^^^^^^^^
        |
        = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(no_const_vec_new)");` to the top of the `build.rs`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `no_non_exhaustive`
       --> src/lib.rs:252:16
        |
    252 | #[cfg_attr(not(no_non_exhaustive), non_exhaustive)]
        |                ^^^^^^^^^^^^^^^^^
        |
        = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(no_non_exhaustive)");` to the top of the `build.rs`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `no_const_vec_new`
       --> src/lib.rs:529:11
        |
    529 | #[cfg(not(no_const_vec_new))]
        |           ^^^^^^^^^^^^^^^^
        |
        = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(no_const_vec_new)");` to the top of the `build.rs`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `no_non_exhaustive`
       --> src/lib.rs:263:11
        |
    263 |     #[cfg(no_non_exhaustive)] // rustc <1.40
        |           ^^^^^^^^^^^^^^^^^
        |
        = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(no_non_exhaustive)");` to the top of the `build.rs`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `no_str_strip_prefix`
     --> src/backport.rs:1:7
      |
    1 | #[cfg(no_str_strip_prefix)] // rustc <1.45
      |       ^^^^^^^^^^^^^^^^^^^
      |
      = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(no_str_strip_prefix)");` to the top of the `build.rs`
      = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `no_str_strip_prefix`
     --> src/backport.rs:6:7
      |
    6 | #[cfg(no_str_strip_prefix)]
      |       ^^^^^^^^^^^^^^^^^^^
      |
      = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(no_str_strip_prefix)");` to the top of the `build.rs`
      = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `no_alloc_crate`
      --> src/backport.rs:19:7
       |
    19 | #[cfg(no_alloc_crate)] // rustc <1.36
       |       ^^^^^^^^^^^^^^
       |
       = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(no_alloc_crate)");` to the top of the `build.rs`
       = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `no_non_exhaustive`
      --> src/display.rs:59:19
       |
    59 |             #[cfg(no_non_exhaustive)]
       |                   ^^^^^^^^^^^^^^^^^
       |
       = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(no_non_exhaustive)");` to the top of the `build.rs`
       = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `doc_cfg`
      --> src/error.rs:29:12
       |
    29 | #[cfg_attr(doc_cfg, doc(cfg(feature = "std")))]
       |            ^^^^^^^
       |
       = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs`
       = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `no_non_exhaustive`
      --> src/eval.rs:39:15
       |
    39 |         #[cfg(no_non_exhaustive)]
       |               ^^^^^^^^^^^^^^^^^
       |
       = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(no_non_exhaustive)");` to the top of the `build.rs`
       = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `no_exhaustive_int_match`
       --> src/identifier.rs:166:19
        |
    166 |             #[cfg(no_exhaustive_int_match)] // rustc <1.33
        |                   ^^^^^^^^^^^^^^^^^^^^^^^
        |
        = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(no_exhaustive_int_match)");` to the top of the `build.rs`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `no_nonzero_bitscan`
       --> src/identifier.rs:327:11
        |
    327 |     #[cfg(no_nonzero_bitscan)]
        |           ^^^^^^^^^^^^^^^^^^
        |
        = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(no_nonzero_bitscan)");` to the top of the `build.rs`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `no_nonzero_bitscan`
       --> src/identifier.rs:416:11
        |
    416 |     #[cfg(no_nonzero_bitscan)] // rustc <1.53
        |           ^^^^^^^^^^^^^^^^^^
        |
        = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(no_nonzero_bitscan)");` to the top of the `build.rs`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `no_const_vec_new`
      --> src/parse.rs:92:27
       |
    92 |                 #[cfg(not(no_const_vec_new))]
       |                           ^^^^^^^^^^^^^^^^
       |
       = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(no_const_vec_new)");` to the top of the `build.rs`
       = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `no_const_vec_new`
      --> src/parse.rs:94:23
       |
    94 |                 #[cfg(no_const_vec_new)] // rustc <1.39
       |                       ^^^^^^^^^^^^^^^^
       |
       = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(no_const_vec_new)");` to the top of the `build.rs`
       = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `no_const_vec_new`
       --> src/lib.rs:497:15
        |
    497 |     #[cfg(not(no_const_vec_new))] // rustc <1.39
        |               ^^^^^^^^^^^^^^^^
        |
        = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(no_const_vec_new)");` to the top of the `build.rs`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
@dtolnay dtolnay merged commit 451b419 into master May 7, 2024
28 checks passed
@dtolnay dtolnay deleted the checkcfg branch May 7, 2024 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant