From aaa8fb6197b82799dfcfb2bc67474180bf23023a Mon Sep 17 00:00:00 2001 From: Christoph Heiss Date: Sat, 9 Jul 2022 17:38:05 +0200 Subject: [PATCH] tools: Add squiid target Signed-off-by: Christoph Heiss --- src/tools/build-manifest/src/main.rs | 1 + src/tools/clippy/clippy_lints/src/attrs.rs | 1 + .../clippy/tests/ui/mismatched_target_os_unix.fixed | 3 +++ src/tools/clippy/tests/ui/mismatched_target_os_unix.rs | 3 +++ .../clippy/tests/ui/mismatched_target_os_unix.stderr | 10 ++++++++++ 5 files changed, 18 insertions(+) diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs index 21dad9eb74a..236d73506c9 100644 --- a/src/tools/build-manifest/src/main.rs +++ b/src/tools/build-manifest/src/main.rs @@ -152,6 +152,7 @@ static TARGETS: &[&str] = &[ "x86_64-unknown-netbsd", "x86_64-unknown-none", "x86_64-unknown-redox", + "x86_64-unknown-squiid", "x86_64-unknown-hermit", "x86_64-unknown-uefi", ]; diff --git a/src/tools/clippy/clippy_lints/src/attrs.rs b/src/tools/clippy/clippy_lints/src/attrs.rs index 751c262673b..b5d650d6c4b 100644 --- a/src/tools/clippy/clippy_lints/src/attrs.rs +++ b/src/tools/clippy/clippy_lints/src/attrs.rs @@ -34,6 +34,7 @@ static UNIX_SYSTEMS: &[&str] = &[ "netbsd", "openbsd", "redox", + "squiid", "solaris", "vxworks", ]; diff --git a/src/tools/clippy/tests/ui/mismatched_target_os_unix.fixed b/src/tools/clippy/tests/ui/mismatched_target_os_unix.fixed index 7d9d406d99d..39514c47a73 100644 --- a/src/tools/clippy/tests/ui/mismatched_target_os_unix.fixed +++ b/src/tools/clippy/tests/ui/mismatched_target_os_unix.fixed @@ -45,6 +45,9 @@ fn l4re() {} #[cfg(target_os = "redox")] fn redox() {} +#[cfg(target_os = "squiid")] +fn squiid() {} + #[cfg(target_os = "solaris")] fn solaris() {} diff --git a/src/tools/clippy/tests/ui/mismatched_target_os_unix.rs b/src/tools/clippy/tests/ui/mismatched_target_os_unix.rs index c1177f1eedc..971f8c9875f 100644 --- a/src/tools/clippy/tests/ui/mismatched_target_os_unix.rs +++ b/src/tools/clippy/tests/ui/mismatched_target_os_unix.rs @@ -45,6 +45,9 @@ fn l4re() {} #[cfg(redox)] fn redox() {} +#[cfg(squiid)] +fn squiid() {} + #[cfg(solaris)] fn solaris() {} diff --git a/src/tools/clippy/tests/ui/mismatched_target_os_unix.stderr b/src/tools/clippy/tests/ui/mismatched_target_os_unix.stderr index 9822c77c9df..b70957ab566 100644 --- a/src/tools/clippy/tests/ui/mismatched_target_os_unix.stderr +++ b/src/tools/clippy/tests/ui/mismatched_target_os_unix.stderr @@ -139,6 +139,16 @@ LL | #[cfg(redox)] | = help: did you mean `unix`? +error: operating system used in target family position + --> $DIR/mismatched_target_os_unix.rs:45:1 + | +LL | #[cfg(squiid)] + | ^^^^^^-----^^ + | | + | help: try: `target_os = "squiid"` + | + = help: did you mean `unix`? + error: operating system used in target family position --> $DIR/mismatched_target_os_unix.rs:48:1 |