]> git.lizzy.rs Git - rust.git/commitdiff
Update tests
authortopecongiro <seuchida@gmail.com>
Tue, 13 Jun 2017 15:09:17 +0000 (00:09 +0900)
committertopecongiro <seuchida@gmail.com>
Tue, 13 Jun 2017 15:09:17 +0000 (00:09 +0900)
tests/source/attrib.rs
tests/target/attrib.rs

index 593fb0ff57ef434aa99835e3c783284e9c5f611f..313dbbb1276352a85e642677a6053a69c51b0777 100644 (file)
@@ -52,3 +52,19 @@ struct Foo {
     # [ derive ( Clone , PartialEq , Debug , Deserialize , Serialize ) ]
     foo: usize,
 }
+
+// #1668
+
+/// Default path (*nix)
+#[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "android")))]
+fn foo() {
+    #[cfg(target_os = "freertos")]
+    match port_id {
+        'a' | 'A' => GpioPort { port_address: GPIO_A },
+        'b' | 'B' => GpioPort { port_address: GPIO_B },
+        _ => panic!(),
+    }
+
+    #[cfg_attr(not(target_os = "freertos"), allow(unused_variables))]
+    let x = 3;
+}
index fb70585bd21cc20433586f0462811984718dcef6..ed152a8124eacdcb0860e60e04a40f6ffee870d5 100644 (file)
@@ -48,3 +48,19 @@ struct Foo {
     #[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
     foo: usize,
 }
+
+// #1668
+
+/// Default path (*nix)
+#[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "android")))]
+fn foo() {
+    #[cfg(target_os = "freertos")]
+    match port_id {
+        'a' | 'A' => GpioPort { port_address: GPIO_A },
+        'b' | 'B' => GpioPort { port_address: GPIO_B },
+        _ => panic!(),
+    }
+
+    #[cfg_attr(not(target_os = "freertos"), allow(unused_variables))]
+    let x = 3;
+}