From 4b698f20691b12e76dd916bdc6ee187270208649 Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Tue, 27 Oct 2020 13:10:31 +0000 Subject: [PATCH] Drop support for cloudabi targets --- clippy_lints/src/attrs.rs | 2 +- tests/ui/mismatched_target_os_non_unix.fixed | 5 +-- tests/ui/mismatched_target_os_non_unix.rs | 5 +-- tests/ui/mismatched_target_os_non_unix.stderr | 35 ++++++------------- 4 files changed, 13 insertions(+), 34 deletions(-) diff --git a/clippy_lints/src/attrs.rs b/clippy_lints/src/attrs.rs index 57702dafa6a0c..9a667aa61b4f5 100644 --- a/clippy_lints/src/attrs.rs +++ b/clippy_lints/src/attrs.rs @@ -40,7 +40,7 @@ static UNIX_SYSTEMS: &[&str] = &[ ]; // NOTE: windows is excluded from the list because it's also a valid target family. -static NON_UNIX_SYSTEMS: &[&str] = &["cloudabi", "hermit", "none", "wasi"]; +static NON_UNIX_SYSTEMS: &[&str] = &["hermit", "none", "wasi"]; declare_clippy_lint! { /// **What it does:** Checks for items annotated with `#[inline(always)]`, diff --git a/tests/ui/mismatched_target_os_non_unix.fixed b/tests/ui/mismatched_target_os_non_unix.fixed index 3ee77dcac31a0..f219a570e7fcc 100644 --- a/tests/ui/mismatched_target_os_non_unix.fixed +++ b/tests/ui/mismatched_target_os_non_unix.fixed @@ -3,9 +3,6 @@ #![warn(clippy::mismatched_target_os)] #![allow(unused)] -#[cfg(target_os = "cloudabi")] -fn cloudabi() {} - #[cfg(target_os = "hermit")] fn hermit() {} @@ -16,7 +13,7 @@ fn wasi() {} fn none() {} // list with conditions -#[cfg(all(not(any(windows, target_os = "cloudabi")), target_os = "wasi"))] +#[cfg(all(not(windows), target_os = "wasi"))] fn list() {} // windows is a valid target family, should be ignored diff --git a/tests/ui/mismatched_target_os_non_unix.rs b/tests/ui/mismatched_target_os_non_unix.rs index 9cc411418e4c4..8a8ae756a4fcf 100644 --- a/tests/ui/mismatched_target_os_non_unix.rs +++ b/tests/ui/mismatched_target_os_non_unix.rs @@ -3,9 +3,6 @@ #![warn(clippy::mismatched_target_os)] #![allow(unused)] -#[cfg(cloudabi)] -fn cloudabi() {} - #[cfg(hermit)] fn hermit() {} @@ -16,7 +13,7 @@ fn wasi() {} fn none() {} // list with conditions -#[cfg(all(not(any(windows, cloudabi)), wasi))] +#[cfg(all(not(windows), wasi))] fn list() {} // windows is a valid target family, should be ignored diff --git a/tests/ui/mismatched_target_os_non_unix.stderr b/tests/ui/mismatched_target_os_non_unix.stderr index 78fc27752d239..5f1b090830464 100644 --- a/tests/ui/mismatched_target_os_non_unix.stderr +++ b/tests/ui/mismatched_target_os_non_unix.stderr @@ -1,23 +1,15 @@ error: operating system used in target family position --> $DIR/mismatched_target_os_non_unix.rs:6:1 | -LL | #[cfg(cloudabi)] - | ^^^^^^--------^^ - | | - | help: try: `target_os = "cloudabi"` - | - = note: `-D clippy::mismatched-target-os` implied by `-D warnings` - -error: operating system used in target family position - --> $DIR/mismatched_target_os_non_unix.rs:9:1 - | LL | #[cfg(hermit)] | ^^^^^^------^^ | | | help: try: `target_os = "hermit"` + | + = note: `-D clippy::mismatched-target-os` implied by `-D warnings` error: operating system used in target family position - --> $DIR/mismatched_target_os_non_unix.rs:12:1 + --> $DIR/mismatched_target_os_non_unix.rs:9:1 | LL | #[cfg(wasi)] | ^^^^^^----^^ @@ -25,7 +17,7 @@ LL | #[cfg(wasi)] | help: try: `target_os = "wasi"` error: operating system used in target family position - --> $DIR/mismatched_target_os_non_unix.rs:15:1 + --> $DIR/mismatched_target_os_non_unix.rs:12:1 | LL | #[cfg(none)] | ^^^^^^----^^ @@ -33,19 +25,12 @@ LL | #[cfg(none)] | help: try: `target_os = "none"` error: operating system used in target family position - --> $DIR/mismatched_target_os_non_unix.rs:19:1 - | -LL | #[cfg(all(not(any(windows, cloudabi)), wasi))] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | -help: try - | -LL | #[cfg(all(not(any(windows, target_os = "cloudabi")), wasi))] - | ^^^^^^^^^^^^^^^^^^^^^^ -help: try + --> $DIR/mismatched_target_os_non_unix.rs:16:1 | -LL | #[cfg(all(not(any(windows, cloudabi)), target_os = "wasi"))] - | ^^^^^^^^^^^^^^^^^^ +LL | #[cfg(all(not(windows), wasi))] + | ^^^^^^^^^^^^^^^^^^^^^^^^----^^^ + | | + | help: try: `target_os = "wasi"` -error: aborting due to 5 previous errors +error: aborting due to 4 previous errors