Drop support for cloudabi targets
This commit is contained in:
parent
113c1476c9
commit
4b698f2069
@ -40,7 +40,7 @@ static UNIX_SYSTEMS: &[&str] = &[
|
|||||||
];
|
];
|
||||||
|
|
||||||
// NOTE: windows is excluded from the list because it's also a valid target family.
|
// 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! {
|
declare_clippy_lint! {
|
||||||
/// **What it does:** Checks for items annotated with `#[inline(always)]`,
|
/// **What it does:** Checks for items annotated with `#[inline(always)]`,
|
||||||
|
@ -3,9 +3,6 @@
|
|||||||
#![warn(clippy::mismatched_target_os)]
|
#![warn(clippy::mismatched_target_os)]
|
||||||
#![allow(unused)]
|
#![allow(unused)]
|
||||||
|
|
||||||
#[cfg(target_os = "cloudabi")]
|
|
||||||
fn cloudabi() {}
|
|
||||||
|
|
||||||
#[cfg(target_os = "hermit")]
|
#[cfg(target_os = "hermit")]
|
||||||
fn hermit() {}
|
fn hermit() {}
|
||||||
|
|
||||||
@ -16,7 +13,7 @@ fn wasi() {}
|
|||||||
fn none() {}
|
fn none() {}
|
||||||
|
|
||||||
// list with conditions
|
// list with conditions
|
||||||
#[cfg(all(not(any(windows, target_os = "cloudabi")), target_os = "wasi"))]
|
#[cfg(all(not(windows), target_os = "wasi"))]
|
||||||
fn list() {}
|
fn list() {}
|
||||||
|
|
||||||
// windows is a valid target family, should be ignored
|
// windows is a valid target family, should be ignored
|
||||||
|
@ -3,9 +3,6 @@
|
|||||||
#![warn(clippy::mismatched_target_os)]
|
#![warn(clippy::mismatched_target_os)]
|
||||||
#![allow(unused)]
|
#![allow(unused)]
|
||||||
|
|
||||||
#[cfg(cloudabi)]
|
|
||||||
fn cloudabi() {}
|
|
||||||
|
|
||||||
#[cfg(hermit)]
|
#[cfg(hermit)]
|
||||||
fn hermit() {}
|
fn hermit() {}
|
||||||
|
|
||||||
@ -16,7 +13,7 @@ fn wasi() {}
|
|||||||
fn none() {}
|
fn none() {}
|
||||||
|
|
||||||
// list with conditions
|
// list with conditions
|
||||||
#[cfg(all(not(any(windows, cloudabi)), wasi))]
|
#[cfg(all(not(windows), wasi))]
|
||||||
fn list() {}
|
fn list() {}
|
||||||
|
|
||||||
// windows is a valid target family, should be ignored
|
// windows is a valid target family, should be ignored
|
||||||
|
@ -1,23 +1,15 @@
|
|||||||
error: operating system used in target family position
|
error: operating system used in target family position
|
||||||
--> $DIR/mismatched_target_os_non_unix.rs:6:1
|
--> $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)]
|
LL | #[cfg(hermit)]
|
||||||
| ^^^^^^------^^
|
| ^^^^^^------^^
|
||||||
| |
|
| |
|
||||||
| help: try: `target_os = "hermit"`
|
| help: try: `target_os = "hermit"`
|
||||||
|
|
|
||||||
|
= note: `-D clippy::mismatched-target-os` implied by `-D warnings`
|
||||||
|
|
||||||
error: operating system used in target family position
|
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)]
|
LL | #[cfg(wasi)]
|
||||||
| ^^^^^^----^^
|
| ^^^^^^----^^
|
||||||
@ -25,7 +17,7 @@ LL | #[cfg(wasi)]
|
|||||||
| help: try: `target_os = "wasi"`
|
| help: try: `target_os = "wasi"`
|
||||||
|
|
||||||
error: operating system used in target family position
|
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)]
|
LL | #[cfg(none)]
|
||||||
| ^^^^^^----^^
|
| ^^^^^^----^^
|
||||||
@ -33,19 +25,12 @@ LL | #[cfg(none)]
|
|||||||
| help: try: `target_os = "none"`
|
| help: try: `target_os = "none"`
|
||||||
|
|
||||||
error: operating system used in target family position
|
error: operating system used in target family position
|
||||||
--> $DIR/mismatched_target_os_non_unix.rs:19:1
|
--> $DIR/mismatched_target_os_non_unix.rs:16:1
|
||||||
|
|
|
|
||||||
LL | #[cfg(all(not(any(windows, cloudabi)), wasi))]
|
LL | #[cfg(all(not(windows), wasi))]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^----^^^
|
||||||
|
|
| |
|
||||||
help: try
|
| help: try: `target_os = "wasi"`
|
||||||
|
|
|
||||||
LL | #[cfg(all(not(any(windows, target_os = "cloudabi")), wasi))]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
help: try
|
|
||||||
|
|
|
||||||
LL | #[cfg(all(not(any(windows, cloudabi)), target_os = "wasi"))]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
error: aborting due to 5 previous errors
|
error: aborting due to 4 previous errors
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user