Skip to content

Commit f3a6fae

Browse files
committed
wip: fix rustc-dep-of-std
1 parent d3e0cdf commit f3a6fae

File tree

7 files changed

+23
-16
lines changed

7 files changed

+23
-16
lines changed

ci/run.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,21 @@ if [ "$target" = "s390x-unknown-linux-gnu" ]; then
101101
passed=0
102102
until [ $n -ge $N ]; do
103103
if [ "$passed" = "0" ]; then
104+
if $cmd --no-default-features --features rustc-dep-of-std; then
105+
passed=$((passed+1))
106+
continue
107+
fi
108+
if [ "$passed" = "1" ]; then
104109
if $cmd --no-default-features; then
105110
passed=$((passed+1))
106111
continue
107112
fi
108-
elif [ "$passed" = "1" ]; then
113+
elif [ "$passed" = "2" ]; then
109114
if $cmd; then
110115
passed=$((passed+1))
111116
continue
112117
fi
113-
elif [ "$passed" = "2" ]; then
118+
elif [ "$passed" = "3" ]; then
114119
if $cmd --features extra_traits; then
115120
break
116121
fi
@@ -119,6 +124,7 @@ if [ "$target" = "s390x-unknown-linux-gnu" ]; then
119124
sleep 1
120125
done
121126
else
127+
$cmd --no-default-features --features rustc-dep-of-std
122128
$cmd --no-default-features
123129
$cmd
124130
$cmd --features extra_traits

src/macros.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ macro_rules! s {
8787
pub struct $i { $($field)* }
8888
}
8989
#[allow(deprecated)]
90-
impl ::Copy for $i {}
90+
impl crate::Copy for $i {}
9191
#[allow(deprecated)]
92-
impl ::Clone for $i {
92+
impl crate::Clone for $i {
9393
fn clone(&self) -> $i { *self }
9494
}
9595
);
@@ -109,8 +109,8 @@ macro_rules! s_paren {
109109
$(#[$attr])*
110110
pub struct $i ( $($field)* );
111111
}
112-
impl ::Copy for $i {}
113-
impl ::Clone for $i {
112+
impl crate::Copy for $i {}
113+
impl crate::Clone for $i {
114114
fn clone(&self) -> $i { *self }
115115
}
116116
)*);
@@ -134,8 +134,8 @@ macro_rules! s_no_extra_traits {
134134
pub union $i { $($field)* }
135135
}
136136

137-
impl ::Copy for $i {}
138-
impl ::Clone for $i {
137+
impl crate::Copy for $i {}
138+
impl crate::Clone for $i {
139139
fn clone(&self) -> $i { *self }
140140
}
141141
);
@@ -147,9 +147,9 @@ macro_rules! s_no_extra_traits {
147147
pub struct $i { $($field)* }
148148
}
149149
#[allow(deprecated)]
150-
impl ::Copy for $i {}
150+
impl crate::Copy for $i {}
151151
#[allow(deprecated)]
152-
impl ::Clone for $i {
152+
impl crate::Clone for $i {
153153
fn clone(&self) -> $i { *self }
154154
}
155155
);
@@ -180,8 +180,8 @@ macro_rules! e {
180180
$(#[$attr])*
181181
pub enum $i { $($field)* }
182182
}
183-
impl ::Copy for $i {}
184-
impl ::Clone for $i {
183+
impl crate::Copy for $i {}
184+
impl crate::Clone for $i {
185185
fn clone(&self) -> $i { *self }
186186
}
187187
)*);

src/unix/bsd/apple/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
use crate::{
66
c_int, c_longlong, c_short, c_uchar, c_uint, c_ulonglong, c_ushort, c_void, cmsghdr, intptr_t,
7-
off_t, size_t, ssize_t,
7+
off_t, size_t, ssize_t, Clone, Copy, Option,
88
};
99

1010
pub type c_char = i8;

src/unix/bsd/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{c_double, c_int, c_short, c_uint, c_ushort, c_void, size_t, ssize_t};
1+
use crate::{c_double, c_int, c_short, c_uint, c_ushort, c_void, size_t, ssize_t, Option};
22

33
pub type off_t = i64;
44
pub type useconds_t = u32;

src/unix/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//! More functions and definitions can be found in the more specific modules
44
//! according to the platform in question.
55
6-
use crate::c_void;
6+
use crate::{c_void, Option};
77

88
pub type c_schar = i8;
99
pub type c_uchar = u8;

src/unix/solarish/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use core::mem::size_of;
22

33
use crate::{
44
c_double, c_int, c_longlong, c_short, c_uchar, c_uint, c_ushort, c_void, size_t, ssize_t,
5+
Clone, Copy,
56
};
67

78
pub type c_char = i8;

src/windows/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Windows CRT definitions
22
3-
use crate::c_void;
3+
use crate::{c_void, Clone, Copy};
44

55
pub type c_schar = i8;
66
pub type c_uchar = u8;

0 commit comments

Comments
 (0)