From e1069403ca3a27d4b19f90a3efab099046602799 Mon Sep 17 00:00:00 2001 From: Seiichi Uchida Date: Mon, 27 Aug 2018 16:12:11 +0900 Subject: [PATCH] Add a test for #2969 --- tests/source/attrib.rs | 20 ++++++++++++++++++++ tests/target/attrib.rs | 26 ++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/tests/source/attrib.rs b/tests/source/attrib.rs index 3e61fe8f492d..113464112695 100644 --- a/tests/source/attrib.rs +++ b/tests/source/attrib.rs @@ -190,3 +190,23 @@ pub struct Params { job: Option } } + +// #2969 +#[cfg(not(all(feature="std", + any(target_os = "linux", target_os = "android", + target_os = "netbsd", + target_os = "dragonfly", + target_os = "haiku", + target_os = "emscripten", + target_os = "solaris", + target_os = "cloudabi", + target_os = "macos", target_os = "ios", + target_os = "freebsd", + target_os = "openbsd", target_os = "bitrig", + target_os = "redox", + target_os = "fuchsia", + windows, + all(target_arch = "wasm32", feature = "stdweb"), + all(target_arch = "wasm32", feature = "wasm-bindgen"), + ))))] +type Os = NoSource; diff --git a/tests/target/attrib.rs b/tests/target/attrib.rs index 8f601f0b9671..84841f33d8ef 100644 --- a/tests/target/attrib.rs +++ b/tests/target/attrib.rs @@ -219,3 +219,29 @@ mod issue_2620 { job: Option, } } + +// #2969 +#[cfg(not(all( + feature = "std", + any( + target_os = "linux", + target_os = "android", + target_os = "netbsd", + target_os = "dragonfly", + target_os = "haiku", + target_os = "emscripten", + target_os = "solaris", + target_os = "cloudabi", + target_os = "macos", + target_os = "ios", + target_os = "freebsd", + target_os = "openbsd", + target_os = "bitrig", + target_os = "redox", + target_os = "fuchsia", + windows, + all(target_arch = "wasm32", feature = "stdweb"), + all(target_arch = "wasm32", feature = "wasm-bindgen"), + ) +)))] +type Os = NoSource;