-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Strengthen well known check-cfg names and values test
- Loading branch information
Showing
3 changed files
with
294 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,225 @@ | ||
warning: unexpected `cfg` condition value: `linuz` | ||
--> $DIR/well-known-values.rs:7:7 | ||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` | ||
--> $DIR/well-known-values.rs:26:5 | ||
| | ||
LL | #[cfg(target_os = "linuz")] | ||
| ^^^^^^^^^^^^------- | ||
| | | ||
| help: there is a expected value with a similar name: `"linux"` | ||
LL | debug_assertions = "_UNEXPECTED_VALUE", | ||
| ^^^^^^^^^^^^^^^^---------------------- | ||
| | | ||
| help: remove the value | ||
| | ||
= 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`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous` | ||
= note: no expected value for `debug_assertions` | ||
= note: `#[warn(unexpected_cfgs)]` on by default | ||
|
||
warning: unexpected `cfg` condition value: `0` | ||
--> $DIR/well-known-values.rs:14:7 | ||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` | ||
--> $DIR/well-known-values.rs:28:5 | ||
| | ||
LL | doc = "_UNEXPECTED_VALUE", | ||
| ^^^---------------------- | ||
| | | ||
| help: remove the value | ||
| | ||
= note: no expected value for `doc` | ||
|
||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` | ||
--> $DIR/well-known-values.rs:30:5 | ||
| | ||
LL | doctest = "_UNEXPECTED_VALUE", | ||
| ^^^^^^^---------------------- | ||
| | | ||
| help: remove the value | ||
| | ||
= note: no expected value for `doctest` | ||
|
||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` | ||
--> $DIR/well-known-values.rs:32:5 | ||
| | ||
LL | miri = "_UNEXPECTED_VALUE", | ||
| ^^^^---------------------- | ||
| | | ||
| help: remove the value | ||
| | ||
= note: no expected value for `miri` | ||
|
||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` | ||
--> $DIR/well-known-values.rs:34:5 | ||
| | ||
LL | overflow_checks = "_UNEXPECTED_VALUE", | ||
| ^^^^^^^^^^^^^^^---------------------- | ||
| | | ||
| help: remove the value | ||
| | ||
= note: no expected value for `overflow_checks` | ||
|
||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` | ||
--> $DIR/well-known-values.rs:36:5 | ||
| | ||
LL | #[cfg(target_has_atomic = "0")] | ||
| ^^^^^^^^^^^^^^^^^^^^--- | ||
| | | ||
| help: there is a expected value with a similar name: `"8"` | ||
LL | panic = "_UNEXPECTED_VALUE", | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: expected values for `panic` are: `abort`, `unwind` | ||
|
||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` | ||
--> $DIR/well-known-values.rs:38:5 | ||
| | ||
LL | proc_macro = "_UNEXPECTED_VALUE", | ||
| ^^^^^^^^^^---------------------- | ||
| | | ||
| help: remove the value | ||
| | ||
= note: no expected value for `proc_macro` | ||
|
||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` | ||
--> $DIR/well-known-values.rs:40:5 | ||
| | ||
LL | relocation_model = "_UNEXPECTED_VALUE", | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: expected values for `relocation_model` are: `dynamic-no-pic`, `pic`, `pie`, `ropi`, `ropi-rwpi`, `rwpi`, `static` | ||
|
||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` | ||
--> $DIR/well-known-values.rs:42:5 | ||
| | ||
LL | sanitize = "_UNEXPECTED_VALUE", | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: expected values for `sanitize` are: `address`, `cfi`, `hwaddress`, `kcfi`, `kernel-address`, `leak`, `memory`, `memtag`, `safestack`, `shadow-call-stack`, `thread` | ||
|
||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` | ||
--> $DIR/well-known-values.rs:44:5 | ||
| | ||
LL | target_abi = "_UNEXPECTED_VALUE", | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: expected values for `target_abi` are: ``, `abi64`, `abiv2`, `abiv2hf`, `eabi`, `eabihf`, `elf`, `fortanix`, `ilp32`, `llvm`, `macabi`, `sim`, `softfloat`, `spe`, `uwp`, `vec-extabi`, `x32` | ||
|
||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` | ||
--> $DIR/well-known-values.rs:46:5 | ||
| | ||
LL | target_arch = "_UNEXPECTED_VALUE", | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: expected values for `target_arch` are: `aarch64`, `arm`, `avr`, `bpf`, `csky`, `hexagon`, `loongarch64`, `m68k`, `mips`, `mips32r6`, `mips64`, `mips64r6`, `msp430`, `nvptx64`, `powerpc`, `powerpc64`, `riscv32`, `riscv64`, `s390x`, `sparc`, `sparc64`, `wasm32`, `wasm64`, `x86`, `x86_64` | ||
|
||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` | ||
--> $DIR/well-known-values.rs:48:5 | ||
| | ||
LL | target_endian = "_UNEXPECTED_VALUE", | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: expected values for `target_endian` are: `big`, `little` | ||
|
||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` | ||
--> $DIR/well-known-values.rs:50:5 | ||
| | ||
LL | target_env = "_UNEXPECTED_VALUE", | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: expected values for `target_env` are: ``, `eabihf`, `gnu`, `gnueabihf`, `msvc`, `musl`, `newlib`, `nto70`, `nto71`, `ohos`, `psx`, `relibc`, `sgx`, `uclibc` | ||
|
||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` | ||
--> $DIR/well-known-values.rs:52:5 | ||
| | ||
LL | target_family = "_UNEXPECTED_VALUE", | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: expected values for `target_family` are: `unix`, `wasm`, `windows` | ||
|
||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` | ||
--> $DIR/well-known-values.rs:55:5 | ||
| | ||
LL | target_has_atomic = "_UNEXPECTED_VALUE", | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: expected values for `target_has_atomic` are: (none), `128`, `16`, `32`, `64`, `8`, `ptr` | ||
|
||
warning: unexpected `cfg` condition value: `aa` | ||
--> $DIR/well-known-values.rs:21:7 | ||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` | ||
--> $DIR/well-known-values.rs:57:5 | ||
| | ||
LL | #[cfg(unix = "aa")] | ||
| ^^^^------- | ||
| | | ||
| help: remove the value | ||
LL | target_has_atomic_equal_alignment = "_UNEXPECTED_VALUE", | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: expected values for `target_has_atomic_equal_alignment` are: (none), `128`, `16`, `32`, `64`, `8`, `ptr` | ||
|
||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` | ||
--> $DIR/well-known-values.rs:59:5 | ||
| | ||
LL | target_has_atomic_load_store = "_UNEXPECTED_VALUE", | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: expected values for `target_has_atomic_load_store` are: (none), `128`, `16`, `32`, `64`, `8`, `ptr` | ||
|
||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` | ||
--> $DIR/well-known-values.rs:61:5 | ||
| | ||
LL | target_os = "_UNEXPECTED_VALUE", | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= 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`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous` | ||
|
||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` | ||
--> $DIR/well-known-values.rs:63:5 | ||
| | ||
LL | target_pointer_width = "_UNEXPECTED_VALUE", | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: expected values for `target_pointer_width` are: `16`, `32`, `64` | ||
|
||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` | ||
--> $DIR/well-known-values.rs:65:5 | ||
| | ||
LL | target_thread_local = "_UNEXPECTED_VALUE", | ||
| ^^^^^^^^^^^^^^^^^^^---------------------- | ||
| | | ||
| help: remove the value | ||
| | ||
= note: no expected value for `target_thread_local` | ||
|
||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` | ||
--> $DIR/well-known-values.rs:67:5 | ||
| | ||
LL | target_vendor = "_UNEXPECTED_VALUE", | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: expected values for `target_vendor` are: `apple`, `espressif`, `fortanix`, `ibm`, `kmc`, `nintendo`, `nvidia`, `pc`, `sony`, `sun`, `unikraft`, `unknown`, `uwp`, `win7`, `wrs` | ||
|
||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` | ||
--> $DIR/well-known-values.rs:69:5 | ||
| | ||
LL | test = "_UNEXPECTED_VALUE", | ||
| ^^^^---------------------- | ||
| | | ||
| help: remove the value | ||
| | ||
= note: no expected value for `test` | ||
|
||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` | ||
--> $DIR/well-known-values.rs:71:5 | ||
| | ||
LL | unix = "_UNEXPECTED_VALUE", | ||
| ^^^^---------------------- | ||
| | | ||
| help: remove the value | ||
| | ||
= note: no expected value for `unix` | ||
|
||
warning: unexpected `cfg` condition value: `miri` | ||
--> $DIR/well-known-values.rs:28:7 | ||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` | ||
--> $DIR/well-known-values.rs:73:5 | ||
| | ||
LL | #[cfg(miri = "miri")] | ||
| ^^^^--------- | ||
| | | ||
| help: remove the value | ||
LL | windows = "_UNEXPECTED_VALUE", | ||
| ^^^^^^^---------------------- | ||
| | | ||
| help: remove the value | ||
| | ||
= note: no expected value for `miri` | ||
= note: no expected value for `windows` | ||
|
||
warning: unexpected `cfg` condition value: `linux` | ||
--> $DIR/well-known-values.rs:35:7 | ||
warning: unexpected `cfg` condition value: `linuz` | ||
--> $DIR/well-known-values.rs:79:7 | ||
| | ||
LL | #[cfg(doc = "linux")] | ||
| ^^^---------- | ||
| | | ||
| help: remove the value | ||
LL | #[cfg(target_os = "linuz")] // testing that we suggest `linux` | ||
| ^^^^^^^^^^^^------- | ||
| | | ||
| help: there is a expected value with a similar name: `"linux"` | ||
| | ||
= note: no expected value for `doc` | ||
= 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`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous` | ||
|
||
warning: 5 warnings emitted | ||
warning: 25 warnings emitted | ||
|