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

Improve check-cfg expected names diagnostic #136016

Merged
merged 3 commits into from
Jan 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 25 additions & 4 deletions compiler/rustc_lint/src/early/diagnostics/check_cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,35 @@ use crate::lints;

const MAX_CHECK_CFG_NAMES_OR_VALUES: usize = 35;

enum FilterWellKnownNames {
Yes,
No,
}

fn sort_and_truncate_possibilities(
sess: &Session,
mut possibilities: Vec<Symbol>,
filter_well_known_names: FilterWellKnownNames,
) -> (Vec<Symbol>, usize) {
let possibilities_len = possibilities.len();

let n_possibilities = if sess.opts.unstable_opts.check_cfg_all_expected {
possibilities.len()
} else {
match filter_well_known_names {
FilterWellKnownNames::Yes => {
possibilities.retain(|cfg_name| {
!sess.psess.check_config.well_known_names.contains(cfg_name)
});
}
FilterWellKnownNames::No => {}
};
std::cmp::min(possibilities.len(), MAX_CHECK_CFG_NAMES_OR_VALUES)
};

possibilities.sort_by(|s1, s2| s1.as_str().cmp(s2.as_str()));

let and_more = possibilities.len().saturating_sub(n_possibilities);
let and_more = possibilities_len.saturating_sub(n_possibilities);
possibilities.truncate(n_possibilities);
(possibilities, and_more)
}
Expand Down Expand Up @@ -198,8 +214,10 @@ pub(super) fn unexpected_cfg_name(
} else {
vec![]
};

let (possibilities, and_more) =
sort_and_truncate_possibilities(sess, possibilities, FilterWellKnownNames::Yes);
let expected_names = if !possibilities.is_empty() {
let (possibilities, and_more) = sort_and_truncate_possibilities(sess, possibilities);
let possibilities: Vec<_> =
possibilities.into_iter().map(|s| Ident::new(s, name_span)).collect();
Some(lints::unexpected_cfg_name::ExpectedNames {
Expand Down Expand Up @@ -269,8 +287,11 @@ pub(super) fn unexpected_cfg_value(
// for names as the possibilities could be very long
let code_sugg = if !possibilities.is_empty() {
let expected_values = {
let (possibilities, and_more) =
sort_and_truncate_possibilities(sess, possibilities.clone());
let (possibilities, and_more) = sort_and_truncate_possibilities(
sess,
possibilities.clone(),
FilterWellKnownNames::No,
);
lints::unexpected_cfg_value::ExpectedValues {
name,
have_none_possibility,
Expand Down
2 changes: 2 additions & 0 deletions src/doc/rustc/src/check-cfg/cargo-specifics.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ the `unexpected_cfgs` lint and `--check-cfg` flag. It is not intended to provide
individual details, for that refer to the [`--check-cfg` documentation](../check-cfg.md) and
to the [Cargo book](../../cargo/index.html).

> The full list of well known cfgs (aka builtins) can be found under [Checking conditional configurations / Well known names and values](../check-cfg.md#well-known-names-and-values).

## Cargo feature

*See the [`[features]` section in the Cargo book][cargo-features] for more details.*
Expand Down
16 changes: 14 additions & 2 deletions tests/ui/check-cfg/allow-same-level.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
// This test check that #[allow(unexpected_cfgs)] doesn't work if put on the same level
// This test check that #[allow(unexpected_cfgs)] **doesn't work**
// when put on the same level as the #[cfg] attribute.
//
// It should work, but due to interactions between how #[cfg]s are
// expanded, the lint machinery and the check-cfg impl, we
// miss the #[allow], althrough we probably shoudln't.
//
// cf. https://github.com/rust-lang/rust/issues/124735
//
//@ check-pass
//@ no-auto-check-cfg
//@ compile-flags: --check-cfg=cfg()
//@ compile-flags: --check-cfg=cfg() --cfg=unknown_but_active_cfg

#[allow(unexpected_cfgs)]
#[cfg(FALSE)]
//~^ WARNING unexpected `cfg` condition name
fn bar() {}

#[allow(unexpected_cfgs)]
#[cfg(unknown_but_active_cfg)]
//~^ WARNING unexpected `cfg` condition name
fn bar() {}

fn main() {}
14 changes: 11 additions & 3 deletions tests/ui/check-cfg/allow-same-level.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
warning: unexpected `cfg` condition name: `FALSE`
--> $DIR/allow-same-level.rs:8:7
--> $DIR/allow-same-level.rs:15:7
|
LL | #[cfg(FALSE)]
| ^^^^^
|
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `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`, `ub_checks`, `unix`, and `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

warning: 1 warning emitted
warning: unexpected `cfg` condition name: `unknown_but_active_cfg`
--> $DIR/allow-same-level.rs:20:7
|
LL | #[cfg(unknown_but_active_cfg)]
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: to expect this configuration use `--check-cfg=cfg(unknown_but_active_cfg)`
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration

warning: 2 warnings emitted

2 changes: 1 addition & 1 deletion tests/ui/check-cfg/cargo-build-script.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name: `has_foo`
LL | #[cfg(has_foo)]
| ^^^^^^^
|
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `fmt_debug`, `has_bar`, `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`, `ub_checks`, `unix`, and `windows`
= help: expected names are: `has_bar` and 30 more
= help: consider using a Cargo feature instead
= help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
[lints.rust]
Expand Down
10 changes: 5 additions & 5 deletions tests/ui/check-cfg/cargo-feature.none.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
warning: unexpected `cfg` condition value: `serde`
--> $DIR/cargo-feature.rs:14:7
--> $DIR/cargo-feature.rs:15:7
|
LL | #[cfg(feature = "serde")]
| ^^^^^^^^^^^^^^^^^ help: remove the condition
Expand All @@ -10,7 +10,7 @@ LL | #[cfg(feature = "serde")]
= note: `#[warn(unexpected_cfgs)]` on by default

warning: unexpected `cfg` condition value: (none)
--> $DIR/cargo-feature.rs:18:7
--> $DIR/cargo-feature.rs:19:7
|
LL | #[cfg(feature)]
| ^^^^^^^ help: remove the condition
Expand All @@ -20,12 +20,12 @@ LL | #[cfg(feature)]
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `tokio_unstable`
--> $DIR/cargo-feature.rs:22:7
--> $DIR/cargo-feature.rs:23:7
|
LL | #[cfg(tokio_unstable)]
| ^^^^^^^^^^^^^^
|
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `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`, `ub_checks`, `unix`, and `windows`
= help: expected names are: `docsrs`, `feature`, and `test` and 30 more
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this PR, Cargo users would now only see those 3 cfgs (which are Cargo defined) instead of the long list.

= help: consider using a Cargo feature instead
= help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
[lints.rust]
Expand All @@ -34,7 +34,7 @@ LL | #[cfg(tokio_unstable)]
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `CONFIG_NVME`
--> $DIR/cargo-feature.rs:26:7
--> $DIR/cargo-feature.rs:27:7
|
LL | #[cfg(CONFIG_NVME = "m")]
| ^^^^^^^^^^^^^^^^^
Expand Down
1 change: 1 addition & 0 deletions tests/ui/check-cfg/cargo-feature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//@ no-auto-check-cfg
//@ revisions: some none
//@ rustc-env:CARGO_CRATE_NAME=foo
//@ compile-flags: --check-cfg=cfg(docsrs,test)
//@ [none]compile-flags: --check-cfg=cfg(feature,values())
//@ [some]compile-flags: --check-cfg=cfg(feature,values("bitcode"))
//@ [some]compile-flags: --check-cfg=cfg(CONFIG_NVME,values("y"))
Expand Down
10 changes: 5 additions & 5 deletions tests/ui/check-cfg/cargo-feature.some.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
warning: unexpected `cfg` condition value: `serde`
--> $DIR/cargo-feature.rs:14:7
--> $DIR/cargo-feature.rs:15:7
|
LL | #[cfg(feature = "serde")]
| ^^^^^^^^^^^^^^^^^
Expand All @@ -10,7 +10,7 @@ LL | #[cfg(feature = "serde")]
= note: `#[warn(unexpected_cfgs)]` on by default

warning: unexpected `cfg` condition value: (none)
--> $DIR/cargo-feature.rs:18:7
--> $DIR/cargo-feature.rs:19:7
|
LL | #[cfg(feature)]
| ^^^^^^^- help: specify a config value: `= "bitcode"`
Expand All @@ -20,12 +20,12 @@ LL | #[cfg(feature)]
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `tokio_unstable`
--> $DIR/cargo-feature.rs:22:7
--> $DIR/cargo-feature.rs:23:7
|
LL | #[cfg(tokio_unstable)]
| ^^^^^^^^^^^^^^
|
= help: expected names are: `CONFIG_NVME`, `clippy`, `debug_assertions`, `doc`, `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`, `ub_checks`, `unix`, and `windows`
= help: expected names are: `CONFIG_NVME`, `docsrs`, `feature`, and `test` and 30 more
= help: consider using a Cargo feature instead
= help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
[lints.rust]
Expand All @@ -34,7 +34,7 @@ LL | #[cfg(tokio_unstable)]
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `m`
--> $DIR/cargo-feature.rs:26:7
--> $DIR/cargo-feature.rs:27:7
|
LL | #[cfg(CONFIG_NVME = "m")]
| ^^^^^^^^^^^^^^---
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/check-cfg/cfg-value-for-cfg-name-duplicate.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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`, `fmt_debug`, `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`, `ub_checks`, `unix`, and `windows`
= help: expected names are: `bar`, `bee`, `cow`, and `foo` and 30 more
= 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
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/check-cfg/cfg-value-for-cfg-name-multiple.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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`, `fmt_debug`, `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`, `ub_checks`, `unix`, and `windows`
= help: expected names are: `bar` and `foo` and 30 more
= 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
Expand Down
1 change: 0 additions & 1 deletion tests/ui/check-cfg/cfg-value-for-cfg-name.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ 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`, `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`, `ub_checks`, `unix`, and `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
Expand Down
1 change: 0 additions & 1 deletion tests/ui/check-cfg/compact-names.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ warning: unexpected `cfg` condition name: `target_architecture`
LL | #[cfg(target(os = "linux", architecture = "arm"))]
| ^^^^^^^^^^^^^^^^^^^^
|
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `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`, `ub_checks`, `unix`, and `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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ warning: unexpected `cfg` condition name: `unknown_key`
LL | #[cfg(unknown_key = "value")]
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `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`, `ub_checks`, `unix`, and `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
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/check-cfg/exhaustive-names-values.feature.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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`, `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`, `ub_checks`, `unix`, and `windows`
= help: expected names are: `feature` and 30 more
= 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
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/check-cfg/exhaustive-names-values.full.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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`, `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`, `ub_checks`, `unix`, and `windows`
= help: expected names are: `feature` and 30 more
= 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
Expand Down
1 change: 0 additions & 1 deletion tests/ui/check-cfg/exhaustive-names.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ warning: unexpected `cfg` condition name: `unknown_key`
LL | #[cfg(unknown_key = "value")]
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `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`, `ub_checks`, `unix`, and `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
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/check-cfg/mix.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ warning: unexpected `cfg` condition name: `uu`
LL | #[cfg_attr(uu, unix)]
| ^^
|
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `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`, `ub_checks`, `unix`, and `windows`
= help: expected names are: `feature` and 30 more
= 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

Expand Down
Loading
Loading