From 61f2baa0af6b2a54e0c109e5f73c8ff25f9f2ca6 Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Sat, 1 Jun 2019 11:46:58 -0700 Subject: Update libc crate to 0.2.57 This change updates the libc crate to version 0.2.57. Import subrepo libc/:libc at cdc48ea36d8d2890dba38e8f779001e6855339a2 --- libc/src/macros.rs | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'libc/src/macros.rs') diff --git a/libc/src/macros.rs b/libc/src/macros.rs index c48ae8b..14a2804 100644 --- a/libc/src/macros.rs +++ b/libc/src/macros.rs @@ -74,10 +74,13 @@ macro_rules! s { __item! { #[repr(C)] #[cfg_attr(feature = "extra_traits", derive(Debug, Eq, Hash, PartialEq))] + #[allow(deprecated)] $(#[$attr])* pub struct $i { $($field)* } } + #[allow(deprecated)] impl ::Copy for $i {} + #[allow(deprecated)] impl ::Clone for $i { fn clone(&self) -> $i { *self } } @@ -155,3 +158,38 @@ macro_rules! align_const { }; )*) } + +// This macro is used to deprecate items that should be accessed via the mach crate +#[allow(unused_macros)] +macro_rules! deprecated_mach { + (pub const $id:ident: $ty:ty = $expr:expr;) => { + #[deprecated( + since = "0.2.55", + note = "Use the `mach` crate instead", + )] + #[allow(deprecated)] + pub const $id: $ty = $expr; + }; + ($(pub const $id:ident: $ty:ty = $expr:expr;)*) => { + $( + deprecated_mach!( + pub const $id: $ty = $expr; + ); + )* + }; + (pub type $id:ident = $ty:ty;) => { + #[deprecated( + since = "0.2.55", + note = "Use the `mach` crate instead", + )] + #[allow(deprecated)] + pub type $id = $ty; + }; + ($(pub type $id:ident = $ty:ty;)*) => { + $( + deprecated_mach!( + pub type $id = $ty; + ); + )* + } +} -- cgit v1.2.1