diff --git a/ci/run.sh b/ci/run.sh index 9754118f742b..c41cb4274bc7 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -101,16 +101,21 @@ if [ "$target" = "s390x-unknown-linux-gnu" ]; then passed=0 until [ $n -ge $N ]; do if [ "$passed" = "0" ]; then + if $cmd --no-default-features --features rustc-dep-of-std; then + passed=$((passed+1)) + continue + fi + if [ "$passed" = "1" ]; then if $cmd --no-default-features; then passed=$((passed+1)) continue fi - elif [ "$passed" = "1" ]; then + elif [ "$passed" = "2" ]; then if $cmd; then passed=$((passed+1)) continue fi - elif [ "$passed" = "2" ]; then + elif [ "$passed" = "3" ]; then if $cmd --features extra_traits; then break fi @@ -119,6 +124,7 @@ if [ "$target" = "s390x-unknown-linux-gnu" ]; then sleep 1 done else + $cmd --no-default-features --features rustc-dep-of-std $cmd --no-default-features $cmd $cmd --features extra_traits diff --git a/src/macros.rs b/src/macros.rs index 514a48f72d8c..05fdd3050e10 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -87,9 +87,9 @@ macro_rules! s { pub struct $i { $($field)* } } #[allow(deprecated)] - impl ::Copy for $i {} + impl crate::Copy for $i {} #[allow(deprecated)] - impl ::Clone for $i { + impl crate::Clone for $i { fn clone(&self) -> $i { *self } } ); @@ -109,8 +109,8 @@ macro_rules! s_paren { $(#[$attr])* pub struct $i ( $($field)* ); } - impl ::Copy for $i {} - impl ::Clone for $i { + impl crate::Copy for $i {} + impl crate::Clone for $i { fn clone(&self) -> $i { *self } } )*); @@ -134,8 +134,8 @@ macro_rules! s_no_extra_traits { pub union $i { $($field)* } } - impl ::Copy for $i {} - impl ::Clone for $i { + impl crate::Copy for $i {} + impl crate::Clone for $i { fn clone(&self) -> $i { *self } } ); @@ -147,9 +147,9 @@ macro_rules! s_no_extra_traits { pub struct $i { $($field)* } } #[allow(deprecated)] - impl ::Copy for $i {} + impl crate::Copy for $i {} #[allow(deprecated)] - impl ::Clone for $i { + impl crate::Clone for $i { fn clone(&self) -> $i { *self } } ); @@ -180,8 +180,8 @@ macro_rules! e { $(#[$attr])* pub enum $i { $($field)* } } - impl ::Copy for $i {} - impl ::Clone for $i { + impl crate::Copy for $i {} + impl crate::Clone for $i { fn clone(&self) -> $i { *self } } )*); diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index 36c2957459a0..eb9fe36bdd35 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -4,7 +4,7 @@ use crate::{ c_int, c_longlong, c_short, c_uchar, c_uint, c_ulonglong, c_ushort, c_void, cmsghdr, intptr_t, - off_t, size_t, ssize_t, + off_t, size_t, ssize_t, Clone, Copy, Option, }; pub type c_char = i8; diff --git a/src/unix/bsd/mod.rs b/src/unix/bsd/mod.rs index 445911b174d6..9d269b30e9c0 100644 --- a/src/unix/bsd/mod.rs +++ b/src/unix/bsd/mod.rs @@ -1,4 +1,4 @@ -use crate::{c_double, c_int, c_short, c_uint, c_ushort, c_void, size_t, ssize_t}; +use crate::{c_double, c_int, c_short, c_uint, c_ushort, c_void, size_t, ssize_t, Option}; pub type off_t = i64; pub type useconds_t = u32; diff --git a/src/unix/mod.rs b/src/unix/mod.rs index 340ae9abd978..e0b6749095f1 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -3,7 +3,7 @@ //! More functions and definitions can be found in the more specific modules //! according to the platform in question. -use crate::c_void; +use crate::{c_void, Option}; pub type c_schar = i8; pub type c_uchar = u8; diff --git a/src/unix/solarish/mod.rs b/src/unix/solarish/mod.rs index 77d0add2042b..b1b7b8ae5e6a 100644 --- a/src/unix/solarish/mod.rs +++ b/src/unix/solarish/mod.rs @@ -2,6 +2,7 @@ use core::mem::size_of; use crate::{ c_double, c_int, c_longlong, c_short, c_uchar, c_uint, c_ushort, c_void, size_t, ssize_t, + Clone, Copy, }; pub type c_char = i8; diff --git a/src/windows/mod.rs b/src/windows/mod.rs index 55a07f799088..1fbb0fbdab42 100644 --- a/src/windows/mod.rs +++ b/src/windows/mod.rs @@ -1,6 +1,6 @@ //! Windows CRT definitions -use crate::c_void; +use crate::{c_void, Clone, Copy}; pub type c_schar = i8; pub type c_uchar = u8;