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

Running cargo check --tests emits "unexpected cfg condition name: ossl102" warning #43

Open
gretchenfrage opened this issue Oct 28, 2024 · 0 comments · May be fixed by #44
Open

Running cargo check --tests emits "unexpected cfg condition name: ossl102" warning #43

gretchenfrage opened this issue Oct 28, 2024 · 0 comments · May be fixed by #44

Comments

@gretchenfrage
Copy link

On current master (81243fa10351f97eb3871aacdd43eace2aee134d) with Rust 1.82.0 (rustc 1.82.0 (f6e511eec 2024-10-15), cargo 1.82.0 (8f40fc59f 2024-08-21)), running cargo check --tests emits with the following warning:

    Checking hyper-openssl v0.10.2 (/home/phoenix/repos/h3stuff/hyper-openssl)
warning: unexpected `cfg` condition name: `ossl102`
   --> src/test.rs:143:38
    |
143 | #[cfg(all(feature = "client-legacy", ossl102))]
    |                                      ^^^^^^^
    |
    = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `fmt_debug`, `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`, and `windows`
    = 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(ossl102)'] }
    = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ossl102)");` 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
    = note: `#[warn(unexpected_cfgs)]` on by default

warning: `hyper-openssl` (lib test) generated 1 warning
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.05s
@gretchenfrage gretchenfrage linked a pull request Oct 28, 2024 that will close this issue
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 a pull request may close this issue.

1 participant