mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
Rollup merge of #124742 - Urgau:check-cfg-rustfmt, r=fmease
Add `rustfmt` cfg to well known cfgs list This PR adds the `rustfmt` cfg to the well known cfgs list. Related to https://github.com/rust-lang/rust/issues/124735
This commit is contained in:
commit
3d97660f40
18 changed files with 56 additions and 37 deletions
|
@ -262,13 +262,15 @@ macro_rules! ins {
|
|||
|
||||
ins!(sym::debug_assertions, no_values);
|
||||
|
||||
// These four are never set by rustc, but we set them anyway: they
|
||||
// should not trigger a lint because `cargo clippy`, `cargo doc`,
|
||||
// `cargo test` and `cargo miri run` (respectively) can set them.
|
||||
// These four are never set by rustc, but we set them anyway; they
|
||||
// should not trigger the lint because `cargo clippy`, `cargo doc`,
|
||||
// `cargo test`, `cargo miri run` and `cargo fmt` (respectively)
|
||||
// can set them.
|
||||
ins!(sym::clippy, no_values);
|
||||
ins!(sym::doc, no_values);
|
||||
ins!(sym::doctest, no_values);
|
||||
ins!(sym::miri, no_values);
|
||||
ins!(sym::rustfmt, no_values);
|
||||
|
||||
ins!(sym::overflow_checks, no_values);
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ Those well known names and values follows the same stability as what they refer
|
|||
Well known names and values checking is always enabled as long as at least one
|
||||
`--check-cfg` argument is present.
|
||||
|
||||
As of `2024-04-06T`, the list of known names is as follows:
|
||||
As of `2024-05-06T`, the list of known names is as follows:
|
||||
|
||||
<!--- See CheckCfg::fill_well_known in compiler/rustc_session/src/config.rs -->
|
||||
|
||||
|
@ -84,6 +84,7 @@ As of `2024-04-06T`, the list of known names is as follows:
|
|||
- `panic`
|
||||
- `proc_macro`
|
||||
- `relocation_model`
|
||||
- `rustfmt`
|
||||
- `sanitize`
|
||||
- `sanitizer_cfi_generalize_pointers`
|
||||
- `sanitizer_cfi_normalize_integers`
|
||||
|
|
|
@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name: `FALSE`
|
|||
LL | #[cfg(FALSE)]
|
||||
| ^^^^^
|
||||
|
|
||||
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `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: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `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: to expect this configuration use `--check-cfg=cfg(FALSE)`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
= note: `#[warn(unexpected_cfgs)]` on by default
|
||||
|
|
|
@ -25,7 +25,7 @@ warning: unexpected `cfg` condition name: `tokio_unstable`
|
|||
LL | #[cfg(tokio_unstable)]
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `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: expected names are: `clippy`, `debug_assertions`, `doc`, `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(tokio_unstable)");` 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
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ warning: unexpected `cfg` condition name: `tokio_unstable`
|
|||
LL | #[cfg(tokio_unstable)]
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: expected names are: `CONFIG_NVME`, `clippy`, `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `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: expected names are: `CONFIG_NVME`, `clippy`, `debug_assertions`, `doc`, `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(tokio_unstable)");` 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
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name: `value`
|
|||
LL | #[cfg(value)]
|
||||
| ^^^^^
|
||||
|
|
||||
= help: expected names are: `bar`, `bee`, `clippy`, `cow`, `debug_assertions`, `doc`, `doctest`, `foo`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `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: expected names are: `bar`, `bee`, `clippy`, `cow`, `debug_assertions`, `doc`, `doctest`, `foo`, `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: to expect this configuration use `--check-cfg=cfg(value)`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
= note: `#[warn(unexpected_cfgs)]` on by default
|
||||
|
|
|
@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name: `my_value`
|
|||
LL | #[cfg(my_value)]
|
||||
| ^^^^^^^^
|
||||
|
|
||||
= help: expected names are: `bar`, `clippy`, `debug_assertions`, `doc`, `doctest`, `foo`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `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: expected names are: `bar`, `clippy`, `debug_assertions`, `doc`, `doctest`, `foo`, `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: to expect this configuration use `--check-cfg=cfg(my_value)`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
= note: `#[warn(unexpected_cfgs)]` on by default
|
||||
|
|
|
@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name: `linux`
|
|||
LL | #[cfg(linux)]
|
||||
| ^^^^^ help: found config with similar value: `target_os = "linux"`
|
||||
|
|
||||
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `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: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `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: to expect this configuration use `--check-cfg=cfg(linux)`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
= note: `#[warn(unexpected_cfgs)]` on by default
|
||||
|
|
|
@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name: `target_architecture`
|
|||
LL | #[cfg(target(os = "linux", architecture = "arm"))]
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `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: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `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: to expect this configuration use `--check-cfg=cfg(target_architecture, values("arm"))`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
= note: `#[warn(unexpected_cfgs)]` on by default
|
||||
|
|
|
@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name: `unknown_key`
|
|||
LL | #[cfg(unknown_key = "value")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `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: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `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: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
= note: `#[warn(unexpected_cfgs)]` on by default
|
||||
|
|
|
@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name: `unknown_key`
|
|||
LL | #[cfg(unknown_key = "value")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `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: expected names are: `clippy`, `debug_assertions`, `doc`, `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: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
= note: `#[warn(unexpected_cfgs)]` on by default
|
||||
|
|
|
@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name: `unknown_key`
|
|||
LL | #[cfg(unknown_key = "value")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `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: expected names are: `clippy`, `debug_assertions`, `doc`, `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: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
= note: `#[warn(unexpected_cfgs)]` on by default
|
||||
|
|
|
@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name: `unknown_key`
|
|||
LL | #[cfg(unknown_key = "value")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `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: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `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: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
= note: `#[warn(unexpected_cfgs)]` on by default
|
||||
|
|
|
@ -44,7 +44,7 @@ warning: unexpected `cfg` condition name: `uu`
|
|||
LL | #[cfg_attr(uu, test)]
|
||||
| ^^
|
||||
|
|
||||
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `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: expected names are: `clippy`, `debug_assertions`, `doc`, `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: to expect this configuration use `--check-cfg=cfg(uu)`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name: `crossbeam_loom`
|
|||
LL | #[cfg(crossbeam_loom)]
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `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: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `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: to expect this configuration use `--check-cfg=cfg(crossbeam_loom)`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
= note: `#[warn(unexpected_cfgs)]` on by default
|
||||
|
|
|
@ -18,7 +18,7 @@ warning: unexpected `cfg` condition name: `features`
|
|||
LL | #[cfg(features = "foo")]
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `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: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `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: to expect this configuration use `--check-cfg=cfg(features, values("foo"))`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
|
|
|
@ -43,6 +43,8 @@
|
|||
//~^ WARN unexpected `cfg` condition value
|
||||
relocation_model = "_UNEXPECTED_VALUE",
|
||||
//~^ WARN unexpected `cfg` condition value
|
||||
rustfmt = "_UNEXPECTED_VALUE",
|
||||
//~^ WARN unexpected `cfg` condition value
|
||||
sanitize = "_UNEXPECTED_VALUE",
|
||||
//~^ WARN unexpected `cfg` condition value
|
||||
target_abi = "_UNEXPECTED_VALUE",
|
||||
|
@ -115,4 +117,7 @@ fn doc() {}
|
|||
#[cfg(clippy)]
|
||||
fn clippy() {}
|
||||
|
||||
#[cfg_attr(rustfmt, rustfmt::skip)]
|
||||
fn rustfmt() {}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -97,6 +97,17 @@ LL | relocation_model = "_UNEXPECTED_VALUE",
|
|||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
|
||||
--> $DIR/well-known-values.rs:46:5
|
||||
|
|
||||
LL | rustfmt = "_UNEXPECTED_VALUE",
|
||||
| ^^^^^^^----------------------
|
||||
| |
|
||||
| help: remove the value
|
||||
|
|
||||
= note: no expected value for `rustfmt`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
|
||||
--> $DIR/well-known-values.rs:48:5
|
||||
|
|
||||
LL | sanitize = "_UNEXPECTED_VALUE",
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
|
@ -104,7 +115,7 @@ LL | sanitize = "_UNEXPECTED_VALUE",
|
|||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
|
||||
--> $DIR/well-known-values.rs:48:5
|
||||
--> $DIR/well-known-values.rs:50:5
|
||||
|
|
||||
LL | target_abi = "_UNEXPECTED_VALUE",
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -113,7 +124,7 @@ LL | target_abi = "_UNEXPECTED_VALUE",
|
|||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
|
||||
--> $DIR/well-known-values.rs:50:5
|
||||
--> $DIR/well-known-values.rs:52:5
|
||||
|
|
||||
LL | target_arch = "_UNEXPECTED_VALUE",
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -122,7 +133,7 @@ LL | target_arch = "_UNEXPECTED_VALUE",
|
|||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
|
||||
--> $DIR/well-known-values.rs:52:5
|
||||
--> $DIR/well-known-values.rs:54:5
|
||||
|
|
||||
LL | target_endian = "_UNEXPECTED_VALUE",
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -131,7 +142,7 @@ LL | target_endian = "_UNEXPECTED_VALUE",
|
|||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
|
||||
--> $DIR/well-known-values.rs:54:5
|
||||
--> $DIR/well-known-values.rs:56:5
|
||||
|
|
||||
LL | target_env = "_UNEXPECTED_VALUE",
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -140,7 +151,7 @@ LL | target_env = "_UNEXPECTED_VALUE",
|
|||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
|
||||
--> $DIR/well-known-values.rs:56:5
|
||||
--> $DIR/well-known-values.rs:58:5
|
||||
|
|
||||
LL | target_family = "_UNEXPECTED_VALUE",
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -149,7 +160,7 @@ LL | target_family = "_UNEXPECTED_VALUE",
|
|||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
|
||||
--> $DIR/well-known-values.rs:58:5
|
||||
--> $DIR/well-known-values.rs:60:5
|
||||
|
|
||||
LL | target_feature = "_UNEXPECTED_VALUE",
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -158,7 +169,7 @@ LL | target_feature = "_UNEXPECTED_VALUE",
|
|||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
|
||||
--> $DIR/well-known-values.rs:60:5
|
||||
--> $DIR/well-known-values.rs:62:5
|
||||
|
|
||||
LL | target_has_atomic = "_UNEXPECTED_VALUE",
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -167,7 +178,7 @@ LL | target_has_atomic = "_UNEXPECTED_VALUE",
|
|||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
|
||||
--> $DIR/well-known-values.rs:62:5
|
||||
--> $DIR/well-known-values.rs:64:5
|
||||
|
|
||||
LL | target_has_atomic_equal_alignment = "_UNEXPECTED_VALUE",
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -176,7 +187,7 @@ LL | target_has_atomic_equal_alignment = "_UNEXPECTED_VALUE",
|
|||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
|
||||
--> $DIR/well-known-values.rs:64:5
|
||||
--> $DIR/well-known-values.rs:66:5
|
||||
|
|
||||
LL | target_has_atomic_load_store = "_UNEXPECTED_VALUE",
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -185,7 +196,7 @@ LL | target_has_atomic_load_store = "_UNEXPECTED_VALUE",
|
|||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
|
||||
--> $DIR/well-known-values.rs:66:5
|
||||
--> $DIR/well-known-values.rs:68:5
|
||||
|
|
||||
LL | target_os = "_UNEXPECTED_VALUE",
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -194,7 +205,7 @@ LL | target_os = "_UNEXPECTED_VALUE",
|
|||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
|
||||
--> $DIR/well-known-values.rs:68:5
|
||||
--> $DIR/well-known-values.rs:70:5
|
||||
|
|
||||
LL | target_pointer_width = "_UNEXPECTED_VALUE",
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -203,7 +214,7 @@ LL | target_pointer_width = "_UNEXPECTED_VALUE",
|
|||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
|
||||
--> $DIR/well-known-values.rs:70:5
|
||||
--> $DIR/well-known-values.rs:72:5
|
||||
|
|
||||
LL | target_thread_local = "_UNEXPECTED_VALUE",
|
||||
| ^^^^^^^^^^^^^^^^^^^----------------------
|
||||
|
@ -214,7 +225,7 @@ LL | target_thread_local = "_UNEXPECTED_VALUE",
|
|||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
|
||||
--> $DIR/well-known-values.rs:72:5
|
||||
--> $DIR/well-known-values.rs:74:5
|
||||
|
|
||||
LL | target_vendor = "_UNEXPECTED_VALUE",
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -223,7 +234,7 @@ LL | target_vendor = "_UNEXPECTED_VALUE",
|
|||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
|
||||
--> $DIR/well-known-values.rs:74:5
|
||||
--> $DIR/well-known-values.rs:76:5
|
||||
|
|
||||
LL | test = "_UNEXPECTED_VALUE",
|
||||
| ^^^^----------------------
|
||||
|
@ -234,7 +245,7 @@ LL | test = "_UNEXPECTED_VALUE",
|
|||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
|
||||
--> $DIR/well-known-values.rs:76:5
|
||||
--> $DIR/well-known-values.rs:78:5
|
||||
|
|
||||
LL | ub_checks = "_UNEXPECTED_VALUE",
|
||||
| ^^^^^^^^^----------------------
|
||||
|
@ -245,7 +256,7 @@ LL | ub_checks = "_UNEXPECTED_VALUE",
|
|||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
|
||||
--> $DIR/well-known-values.rs:78:5
|
||||
--> $DIR/well-known-values.rs:80:5
|
||||
|
|
||||
LL | unix = "_UNEXPECTED_VALUE",
|
||||
| ^^^^----------------------
|
||||
|
@ -256,7 +267,7 @@ LL | unix = "_UNEXPECTED_VALUE",
|
|||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
|
||||
--> $DIR/well-known-values.rs:80:5
|
||||
--> $DIR/well-known-values.rs:82:5
|
||||
|
|
||||
LL | windows = "_UNEXPECTED_VALUE",
|
||||
| ^^^^^^^----------------------
|
||||
|
@ -267,7 +278,7 @@ LL | windows = "_UNEXPECTED_VALUE",
|
|||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
warning: unexpected `cfg` condition value: `linuz`
|
||||
--> $DIR/well-known-values.rs:86:7
|
||||
--> $DIR/well-known-values.rs:88:7
|
||||
|
|
||||
LL | #[cfg(target_os = "linuz")] // testing that we suggest `linux`
|
||||
| ^^^^^^^^^^^^-------
|
||||
|
@ -277,5 +288,5 @@ LL | #[cfg(target_os = "linuz")] // testing that we suggest `linux`
|
|||
= note: expected values for `target_os` are: `aix`, `android`, `cuda`, `dragonfly`, `emscripten`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `hermit`, `horizon`, `hurd`, `illumos`, `ios`, `l4re`, `linux`, `macos`, `netbsd`, `none`, `nto`, `openbsd`, `psp`, `redox`, `solaris`, `solid_asp3`, `teeos`, `tvos`, `uefi`, `unknown`, `visionos`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous`, `zkvm`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
warning: 28 warnings emitted
|
||||
warning: 29 warnings emitted
|
||||
|
||||
|
|
Loading…
Reference in a new issue