Skip to content

Commit

Permalink
wip: fix rustc-dep-of-std
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross35 committed Nov 27, 2024
1 parent d3e0cdf commit f3a6fae
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 16 deletions.
10 changes: 8 additions & 2 deletions ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
20 changes: 10 additions & 10 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}
);
Expand All @@ -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 }
}
)*);
Expand All @@ -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 }
}
);
Expand All @@ -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 }
}
);
Expand Down Expand Up @@ -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 }
}
)*);
Expand Down
2 changes: 1 addition & 1 deletion src/unix/bsd/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/unix/bsd/mod.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/unix/solarish/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/windows/mod.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit f3a6fae

Please sign in to comment.