Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
1f2db3d
Add an example to demonstrate how Rc::into_inner works
Takashiidobe Feb 17, 2024
cb8ce9d
time complexity for push
20jasper Feb 16, 2024
bb6dca0
time complexity for push_within_capacity
20jasper Feb 16, 2024
0a5d684
time complexity for pop
20jasper Feb 16, 2024
d2f825f
time complexity for insert
20jasper Feb 18, 2024
ef1a584
intradoc link for vec
20jasper Feb 18, 2024
a9cfeb3
fix typo in push documentation
20jasper Feb 18, 2024
bc52e5d
Fix error in push docs
20jasper Feb 18, 2024
261da5f
Clarify/add `must_use` message for Rc/Arc/Weak::into_raw.
zachs18 Feb 19, 2024
74151cb
Make push docs more vague
20jasper Feb 25, 2024
e0a726c
Adjust error yield/await lowering
compiler-errors Feb 27, 2024
91322f4
Limit the number of names and values in check-cfg diagnostics
Urgau Feb 16, 2024
f5f11e1
Add regression test
oli-obk Mar 1, 2024
c3954b3
Add a tidy check that checks whether the fluent slugs only appear once
mu001999 Mar 2, 2024
d88c7ff
Remove unused fluent messages
mu001999 Mar 2, 2024
dd0004a
Don't panic when waiting on poisoned queries
Zoxc Aug 16, 2023
a9a9798
Removing absolute path in proc-macro
sundeep-kokkonda Mar 4, 2024
8364a06
Merge the impl trait in assoc type collector into the opaque type col…
oli-obk Mar 4, 2024
4e03c51
hir_analysis: enums return `None` in `find_field`
davidtwco Mar 4, 2024
640e99c
Fix duplicated path in the "not found dylib" error
GuillaumeGomez Mar 4, 2024
5e6e140
Add regression ui test for duplicated path in dylib error
GuillaumeGomez Mar 4, 2024
2af01a2
Abort on arity mismatch
Nadrieril Mar 4, 2024
fb91610
Avoid using unnecessary queries when printing the query stack in panics
Zoxc Mar 4, 2024
86e88fc
interpret/cast: make more matches on FloatTy properly exhaustive
RalfJung Mar 4, 2024
681dc38
typo
RalfJung Mar 4, 2024
4dbd256
Explain use of display adapters
CAD97 Feb 14, 2024
215a4b6
doc wording improvements
CAD97 Mar 5, 2024
6e85695
Rollup merge of #121065 - CAD97:display-i18n, r=cuviper
jhpratt Mar 5, 2024
7fb3b5e
Rollup merge of #121202 - Urgau:check-cfg-limit-diagnostics, r=pnkfelix
jhpratt Mar 5, 2024
7852ee9
Rollup merge of #121213 - Takashiidobe:takashi/example-for-rc-into-in…
jhpratt Mar 5, 2024
1dcdfb3
Rollup merge of #121262 - 20jasper:add-vector-time-complexity, r=cuviper
jhpratt Mar 5, 2024
f5d4a5d
Rollup merge of #121287 - zachs18:rc-into-raw-must-use, r=cuviper
jhpratt Mar 5, 2024
b4245e1
Rollup merge of #121664 - compiler-errors:adjust-error-yield-lowering…
jhpratt Mar 5, 2024
c850191
Rollup merge of #121838 - oli-obk:impl_trait_in_assoc_tys_fix, r=comp…
jhpratt Mar 5, 2024
1938ec0
Rollup merge of #121860 - mu001999:master, r=Nilstrieb
jhpratt Mar 5, 2024
0a6b60b
Rollup merge of #121913 - Zoxc:query-fix, r=compiler-errors
jhpratt Mar 5, 2024
8698b24
Rollup merge of #121959 - sundeep-kokkonda:patch-2, r=davidtwco
jhpratt Mar 5, 2024
d03f11d
Rollup merge of #121975 - davidtwco:issue-121757, r=petrochenkov
jhpratt Mar 5, 2024
a6ef0cc
Rollup merge of #121978 - GuillaumeGomez:dylib-duplicated-path, r=bjorn3
jhpratt Mar 5, 2024
425caf7
Rollup merge of #121987 - Nadrieril:abort-on-arity-mismatch, r=compil…
jhpratt Mar 5, 2024
ac4eb31
Rollup merge of #121993 - Zoxc:query-stack-panic-queries, r=compiler-…
jhpratt Mar 5, 2024
4a65a53
Rollup merge of #121997 - RalfJung:cast-float-ty, r=compiler-errors
jhpratt Mar 5, 2024
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
Prev Previous commit
Next Next commit
Limit the number of names and values in check-cfg diagnostics
  • Loading branch information
Urgau committed Feb 29, 2024
commit 91322f4e702799dd9275a5cdd87d30b787cfc619
71 changes: 51 additions & 20 deletions compiler/rustc_lint/src/context/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,43 @@ use rustc_span::edit_distance::find_best_match_for_name;
use rustc_span::symbol::{sym, Symbol};
use rustc_span::BytePos;

const MAX_CHECK_CFG_NAMES_OR_VALUES: usize = 35;

fn check_cfg_expected_note(
sess: &Session,
possibilities: &[Symbol],
type_: &str,
name: Option<Symbol>,
suffix: &str,
) -> String {
use std::fmt::Write;

let n_possibilities = if sess.opts.unstable_opts.check_cfg_all_expected {
possibilities.len()
} else {
std::cmp::min(possibilities.len(), MAX_CHECK_CFG_NAMES_OR_VALUES)
};

let mut possibilities = possibilities.iter().map(Symbol::as_str).collect::<Vec<_>>();
possibilities.sort();

let and_more = possibilities.len().saturating_sub(n_possibilities);
let possibilities = possibilities[..n_possibilities].join("`, `");

let mut note = String::with_capacity(50 + possibilities.len());

write!(&mut note, "expected {type_}").unwrap();
if let Some(name) = name {
write!(&mut note, " for `{name}`").unwrap();
}
write!(&mut note, " are: {suffix}`{possibilities}`").unwrap();
if and_more > 0 {
write!(&mut note, " and {and_more} more").unwrap();
}

note
}

pub(super) fn builtin(sess: &Session, diagnostic: BuiltinLintDiagnostics, diag: &mut Diag<'_, ()>) {
match diagnostic {
BuiltinLintDiagnostics::UnicodeTextFlow(span, content) => {
Expand Down Expand Up @@ -291,16 +328,13 @@ pub(super) fn builtin(sess: &Session, diagnostic: BuiltinLintDiagnostics, diag:
}
}
if !possibilities.is_empty() {
let mut possibilities =
possibilities.iter().map(Symbol::as_str).collect::<Vec<_>>();
possibilities.sort();
let possibilities = possibilities.join("`, `");

// The list of expected names can be long (even by default) and
// so the diagnostic produced can take a lot of space. To avoid
// cloging the user output we only want to print that diagnostic
// once.
diag.help_once(format!("expected names are: `{possibilities}`"));
diag.help_once(check_cfg_expected_note(
sess,
&possibilities,
"names",
None,
"",
));
}
}

Expand Down Expand Up @@ -344,16 +378,13 @@ pub(super) fn builtin(sess: &Session, diagnostic: BuiltinLintDiagnostics, diag:
// Show the full list if all possible values for a given name, but don't do it
// for names as the possibilities could be very long
if !possibilities.is_empty() {
{
let mut possibilities =
possibilities.iter().map(Symbol::as_str).collect::<Vec<_>>();
possibilities.sort();

let possibilities = possibilities.join("`, `");
let none = if have_none_possibility { "(none), " } else { "" };

diag.note(format!("expected values for `{name}` are: {none}`{possibilities}`"));
}
diag.note(check_cfg_expected_note(
sess,
&possibilities,
"values",
Some(name),
if have_none_possibility { "(none), " } else { "" },
));

if let Some((value, value_span)) = value {
// Suggest the most probable if we found one
Expand Down
2 changes: 2 additions & 0 deletions compiler/rustc_session/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1551,6 +1551,8 @@ options! {
"set options for branch target identification and pointer authentication on AArch64"),
cf_protection: CFProtection = (CFProtection::None, parse_cfprotection, [TRACKED],
"instrument control-flow architecture protection"),
check_cfg_all_expected: bool = (false, parse_bool, [UNTRACKED],
"show all expected values in check-cfg diagnostics (default: no)"),
codegen_backend: Option<String> = (None, parse_opt_string, [TRACKED],
"the backend to use"),
collapse_macro_debuginfo: CollapseMacroDebuginfo = (CollapseMacroDebuginfo::Unspecified,
Expand Down
2 changes: 2 additions & 0 deletions tests/ui/check-cfg/mix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ fn test_cfg_macro() {
//~^ WARNING unexpected `cfg` condition value
//~| WARNING unexpected `cfg` condition value
//~| WARNING unexpected `cfg` condition value
cfg!(target_feature = "zebra");
//~^ WARNING unexpected `cfg` condition value
}

fn main() {}
11 changes: 10 additions & 1 deletion tests/ui/check-cfg/mix.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -245,5 +245,14 @@ LL | cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
= help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))`
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration

warning: 26 warnings emitted
warning: unexpected `cfg` condition value: `zebra`
--> $DIR/mix.rs:77:10
|
LL | cfg!(target_feature = "zebra");
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `target_feature` are: `10e60`, `2e3`, `3e3r1`, `3e3r2`, `3e3r3`, `3e7`, `7e10`, `a`, `aclass`, `adx`, `aes`, `altivec`, `alu32`, `atomics`, `avx`, `avx2`, `avx512bf16`, `avx512bitalg`, `avx512bw`, `avx512cd`, `avx512dq`, `avx512er`, `avx512f`, `avx512fp16`, `avx512ifma`, `avx512pf`, `avx512vbmi`, `avx512vbmi2`, `avx512vl`, `avx512vnni`, `avx512vp2intersect`, `avx512vpopcntdq`, `bf16`, `bmi1`, `bmi2` and 186 more
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration

warning: 27 warnings emitted

1 change: 1 addition & 0 deletions tests/ui/check-cfg/well-known-values.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//
//@ check-pass
//@ compile-flags: --check-cfg=cfg() -Z unstable-options
//@ compile-flags: -Zcheck-cfg-all-expected

#![feature(cfg_overflow_checks)]
#![feature(cfg_relocation_model)]
Expand Down
54 changes: 27 additions & 27 deletions tests/ui/check-cfg/well-known-values.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:25:5
--> $DIR/well-known-values.rs:26:5
|
LL | clippy = "_UNEXPECTED_VALUE",
| ^^^^^^----------------------
Expand All @@ -11,7 +11,7 @@ LL | clippy = "_UNEXPECTED_VALUE",
= note: `#[warn(unexpected_cfgs)]` on by default

warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:27:5
--> $DIR/well-known-values.rs:28:5
|
LL | debug_assertions = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^----------------------
Expand All @@ -22,7 +22,7 @@ LL | debug_assertions = "_UNEXPECTED_VALUE",
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:29:5
--> $DIR/well-known-values.rs:30:5
|
LL | doc = "_UNEXPECTED_VALUE",
| ^^^----------------------
Expand All @@ -33,7 +33,7 @@ LL | doc = "_UNEXPECTED_VALUE",
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:31:5
--> $DIR/well-known-values.rs:32:5
|
LL | doctest = "_UNEXPECTED_VALUE",
| ^^^^^^^----------------------
Expand All @@ -44,7 +44,7 @@ LL | doctest = "_UNEXPECTED_VALUE",
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:33:5
--> $DIR/well-known-values.rs:34:5
|
LL | miri = "_UNEXPECTED_VALUE",
| ^^^^----------------------
Expand All @@ -55,7 +55,7 @@ LL | miri = "_UNEXPECTED_VALUE",
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:35:5
--> $DIR/well-known-values.rs:36:5
|
LL | overflow_checks = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^----------------------
Expand All @@ -66,7 +66,7 @@ LL | overflow_checks = "_UNEXPECTED_VALUE",
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:37:5
--> $DIR/well-known-values.rs:38:5
|
LL | panic = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -75,7 +75,7 @@ LL | panic = "_UNEXPECTED_VALUE",
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:39:5
--> $DIR/well-known-values.rs:40:5
|
LL | proc_macro = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^----------------------
Expand All @@ -86,7 +86,7 @@ LL | proc_macro = "_UNEXPECTED_VALUE",
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:41:5
--> $DIR/well-known-values.rs:42:5
|
LL | relocation_model = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -95,7 +95,7 @@ LL | relocation_model = "_UNEXPECTED_VALUE",
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:43:5
--> $DIR/well-known-values.rs:44:5
|
LL | sanitize = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -104,7 +104,7 @@ LL | sanitize = "_UNEXPECTED_VALUE",
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:45:5
--> $DIR/well-known-values.rs:46:5
|
LL | target_abi = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -113,7 +113,7 @@ LL | target_abi = "_UNEXPECTED_VALUE",
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:47:5
--> $DIR/well-known-values.rs:48:5
|
LL | target_arch = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -122,7 +122,7 @@ LL | target_arch = "_UNEXPECTED_VALUE",
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:49:5
--> $DIR/well-known-values.rs:50:5
|
LL | target_endian = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -131,7 +131,7 @@ LL | target_endian = "_UNEXPECTED_VALUE",
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:51:5
--> $DIR/well-known-values.rs:52:5
|
LL | target_env = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -140,7 +140,7 @@ LL | target_env = "_UNEXPECTED_VALUE",
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:53:5
--> $DIR/well-known-values.rs:54:5
|
LL | target_family = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -149,7 +149,7 @@ LL | target_family = "_UNEXPECTED_VALUE",
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:55:5
--> $DIR/well-known-values.rs:56:5
|
LL | target_feature = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -158,7 +158,7 @@ LL | target_feature = "_UNEXPECTED_VALUE",
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:57:5
--> $DIR/well-known-values.rs:58:5
|
LL | target_has_atomic = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -167,7 +167,7 @@ LL | target_has_atomic = "_UNEXPECTED_VALUE",
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:59:5
--> $DIR/well-known-values.rs:60:5
|
LL | target_has_atomic_equal_alignment = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -176,7 +176,7 @@ LL | target_has_atomic_equal_alignment = "_UNEXPECTED_VALUE",
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:61:5
--> $DIR/well-known-values.rs:62:5
|
LL | target_has_atomic_load_store = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -185,7 +185,7 @@ LL | target_has_atomic_load_store = "_UNEXPECTED_VALUE",
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:63:5
--> $DIR/well-known-values.rs:64:5
|
LL | target_os = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -194,7 +194,7 @@ LL | target_os = "_UNEXPECTED_VALUE",
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:65:5
--> $DIR/well-known-values.rs:66:5
|
LL | target_pointer_width = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -203,7 +203,7 @@ LL | target_pointer_width = "_UNEXPECTED_VALUE",
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:67:5
--> $DIR/well-known-values.rs:68:5
|
LL | target_thread_local = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^----------------------
Expand All @@ -214,7 +214,7 @@ LL | target_thread_local = "_UNEXPECTED_VALUE",
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:69:5
--> $DIR/well-known-values.rs:70:5
|
LL | target_vendor = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -223,7 +223,7 @@ LL | target_vendor = "_UNEXPECTED_VALUE",
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:71:5
--> $DIR/well-known-values.rs:72:5
|
LL | test = "_UNEXPECTED_VALUE",
| ^^^^----------------------
Expand All @@ -234,7 +234,7 @@ LL | test = "_UNEXPECTED_VALUE",
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:73:5
--> $DIR/well-known-values.rs:74:5
|
LL | unix = "_UNEXPECTED_VALUE",
| ^^^^----------------------
Expand All @@ -245,7 +245,7 @@ LL | unix = "_UNEXPECTED_VALUE",
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
--> $DIR/well-known-values.rs:75:5
--> $DIR/well-known-values.rs:76:5
|
LL | windows = "_UNEXPECTED_VALUE",
| ^^^^^^^----------------------
Expand All @@ -256,7 +256,7 @@ LL | windows = "_UNEXPECTED_VALUE",
= note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `linuz`
--> $DIR/well-known-values.rs:81:7
--> $DIR/well-known-values.rs:82:7
|
LL | #[cfg(target_os = "linuz")] // testing that we suggest `linux`
| ^^^^^^^^^^^^-------
Expand Down