Add more from the std
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
//! Compatibility module for C platform-specific types. Use [`core::ffi`] instead.
|
||||
|
||||
#![stable(feature = "raw_os", since = "1.1.0")]
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
macro_rules! alias_core_ffi {
|
||||
($($t:ident)*) => {$(
|
||||
#[stable(feature = "raw_os", since = "1.1.0")]
|
||||
#[doc = include_str!(concat!("../../../../core/src/ffi/", stringify!($t), ".md"))]
|
||||
#[doc(cfg(all()))]
|
||||
pub type $t = core::ffi::$t;
|
||||
)*}
|
||||
}
|
||||
|
||||
alias_core_ffi! {
|
||||
c_char c_schar c_uchar
|
||||
c_short c_ushort
|
||||
c_int c_uint
|
||||
c_long c_ulong
|
||||
c_longlong c_ulonglong
|
||||
c_float
|
||||
c_double
|
||||
c_void
|
||||
}
|
||||
1
library/std/src/os/raw/mod.rs
Symbolic link
1
library/std/src/os/raw/mod.rs
Symbolic link
@@ -0,0 +1 @@
|
||||
/home/julien/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/os/raw/mod.rs
|
||||
@@ -1,17 +0,0 @@
|
||||
#![cfg(not(all(windows, target_env = "msvc")))]
|
||||
|
||||
use crate::any::TypeId;
|
||||
|
||||
macro_rules! ok {
|
||||
($($t:ident)*) => {$(
|
||||
assert!(TypeId::of::<libc::$t>() == TypeId::of::<raw::$t>(),
|
||||
"{} is wrong", stringify!($t));
|
||||
)*}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn same() {
|
||||
use crate::os::raw;
|
||||
ok!(c_char c_schar c_uchar c_short c_ushort c_int c_uint c_long c_ulong
|
||||
c_longlong c_ulonglong c_float c_double);
|
||||
}
|
||||
1
library/std/src/os/raw/tests.rs
Symbolic link
1
library/std/src/os/raw/tests.rs
Symbolic link
@@ -0,0 +1 @@
|
||||
/home/julien/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/os/raw/tests.rs
|
||||
Reference in New Issue
Block a user