|
| 1 | +error: target-based cfg should be avoided in build scripts |
| 2 | + --> $DIR/misleading_cfg_in_build_script.rs:10:1 |
| 3 | + | |
| 4 | +LL | #[cfg(windows)] |
| 5 | + | ^^^^^^^^^^^^^^^ |
| 6 | + | |
| 7 | +note: the lint level is defined here |
| 8 | + --> $DIR/misleading_cfg_in_build_script.rs:7:9 |
| 9 | + | |
| 10 | +LL | #![deny(misleading_cfg_in_build_script)] |
| 11 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 12 | + |
| 13 | +error: target-based cfg should be avoided in build scripts |
| 14 | + --> $DIR/misleading_cfg_in_build_script.rs:13:1 |
| 15 | + | |
| 16 | +LL | #[cfg(not(windows))] |
| 17 | + | ^^^^^^^^^^^^^^^^^^^^ |
| 18 | + |
| 19 | +error: target-based cfg should be avoided in build scripts |
| 20 | + --> $DIR/misleading_cfg_in_build_script.rs:16:11 |
| 21 | + | |
| 22 | +LL | #[cfg(any(windows, feature = "yellow", unix))] |
| 23 | + | ^^^^^^^ ^^^^ |
| 24 | + |
| 25 | +error: target-based cfg should be avoided in build scripts |
| 26 | + --> $DIR/misleading_cfg_in_build_script.rs:27:8 |
| 27 | + | |
| 28 | +LL | if cfg!(windows) {} |
| 29 | + | ^^^^^^^^^^^^^ help: use cargo environment variables if possible: `std::env::var("CARGO_CFG_WINDOWS").is_ok()` |
| 30 | + |
| 31 | +error: target-based cfg should be avoided in build scripts |
| 32 | + --> $DIR/misleading_cfg_in_build_script.rs:29:8 |
| 33 | + | |
| 34 | +LL | if cfg!(not(windows)) {} |
| 35 | + | ^^^^^^^^^^^^^^^^^^ help: use cargo environment variables if possible: `std::env::var("CARGO_CFG_WINDOWS").is_err()` |
| 36 | + |
| 37 | +error: target-based cfg should be avoided in build scripts |
| 38 | + --> $DIR/misleading_cfg_in_build_script.rs:31:8 |
| 39 | + | |
| 40 | +LL | if cfg!(target_os = "freebsd") {} |
| 41 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use cargo environment variables if possible: `std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default() == "freebsd"` |
| 42 | + |
| 43 | +error: target-based cfg should be avoided in build scripts |
| 44 | + --> $DIR/misleading_cfg_in_build_script.rs:33:8 |
| 45 | + | |
| 46 | +LL | if cfg!(any(target_os = "freebsd", windows)) {} |
| 47 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use cargo environment variables if possible: `std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default() == "freebsd" || std::env::var("CARGO_CFG_WINDOWS").is_ok()` |
| 48 | + |
| 49 | +error: target-based cfg should be avoided in build scripts |
| 50 | + --> $DIR/misleading_cfg_in_build_script.rs:35:8 |
| 51 | + | |
| 52 | +LL | if cfg!(not(any(target_os = "freebsd", windows))) {} |
| 53 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use cargo environment variables if possible: `!(std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default() == "freebsd" || std::env::var("CARGO_CFG_WINDOWS").is_ok())` |
| 54 | + |
| 55 | +error: target-based cfg should be avoided in build scripts |
| 56 | + --> $DIR/misleading_cfg_in_build_script.rs:37:8 |
| 57 | + | |
| 58 | +LL | if cfg!(all(target_os = "freebsd", windows)) {} |
| 59 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use cargo environment variables if possible: `std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default() == "freebsd" && std::env::var("CARGO_CFG_WINDOWS").is_ok()` |
| 60 | + |
| 61 | +error: target-based cfg should be avoided in build scripts |
| 62 | + --> $DIR/misleading_cfg_in_build_script.rs:39:8 |
| 63 | + | |
| 64 | +LL | if cfg!(not(all(target_os = "freebsd", windows))) {} |
| 65 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use cargo environment variables if possible: `!(std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default() == "freebsd" && std::env::var("CARGO_CFG_WINDOWS").is_ok())` |
| 66 | + |
| 67 | +error: target-based cfg should be avoided in build scripts |
| 68 | + --> $DIR/misleading_cfg_in_build_script.rs:41:8 |
| 69 | + | |
| 70 | +LL | if cfg!(all(target_os = "freebsd", any(windows, not(feature = "red")))) {} |
| 71 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use cargo environment variables if possible: `std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default() == "freebsd" && (std::env::var("CARGO_CFG_WINDOWS").is_ok() || cfg!(not(feature = red)))` |
| 72 | + |
| 73 | +error: aborting due to 11 previous errors |
| 74 | + |
0 commit comments