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

warning: unexpected cfg condition name: manual_codegen_check #21

Open
kesyog opened this issue Dec 25, 2024 · 0 comments · May be fixed by #22
Open

warning: unexpected cfg condition name: manual_codegen_check #21

kesyog opened this issue Dec 25, 2024 · 0 comments · May be fixed by #22
Assignees
Labels

Comments

@kesyog
Copy link

kesyog commented Dec 25, 2024

On the tip of master (ecfa500f36c69afdbe8f6c3de10560c3c64966fb), building gives the following error:

❯ cargo build
warning: no edition set: defaulting to the 2015 edition while 2018 is compatible with `rust-version`
   Compiling shlex v1.3.0 (.../rust-shlex)
warning: unexpected `cfg` condition name: `manual_codegen_check`
   --> src/bytes.rs:353:12
    |
353 | #[cfg_attr(manual_codegen_check, inline(never))]
    |            ^^^^^^^^^^^^^^^^^^^^
    |
    = 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(manual_codegen_check)'] }
    = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(manual_codegen_check)");` 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: `shlex` (lib) generated 1 warning
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.09s

This error message shows up when building any crates that use rust-shlex as well. Not sure what the original intention of this statement was, but can we remove it?

@comex comex self-assigned this Dec 25, 2024
@comex comex added the bug label Dec 25, 2024
comex added a commit that referenced this issue Dec 27, 2024
The cfg is valid as it's intended to be passed manually to rustc.

Fixes #21.
comex added a commit that referenced this issue Dec 27, 2024
The cfg is valid as it's intended to be passed manually to rustc.

Fixes #21.
@comex comex linked a pull request Dec 27, 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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants