diff --git a/cocoa-foundation/Cargo.toml b/cocoa-foundation/Cargo.toml index 523a6d14..44a4083b 100644 --- a/cocoa-foundation/Cargo.toml +++ b/cocoa-foundation/Cargo.toml @@ -12,11 +12,11 @@ license = "MIT / Apache-2.0" default-target = "x86_64-apple-darwin" [dependencies] -block = { version = "=0.2.0-alpha.5", package = "block2" } +block = { version = "=0.2.0-alpha.6", package = "block2" } bitflags = "1.0" libc = "0.2" core-foundation = { path = "../core-foundation", version = "0.9" } core-graphics-types = { path = "../core-graphics-types", version = "0.1" } foreign-types = "0.3" -objc2 = { version = "=0.3.0-beta.1" } -objc2-encode = { version = "=2.0.0-pre.1" } +objc2 = { version = "=0.3.0-beta.2" } +objc2-encode = { version = "=2.0.0-pre.2" } diff --git a/cocoa-foundation/src/foundation.rs b/cocoa-foundation/src/foundation.rs index ba04996b..4cd83a18 100644 --- a/cocoa-foundation/src/foundation.rs +++ b/cocoa-foundation/src/foundation.rs @@ -58,7 +58,7 @@ mod macos { } unsafe impl Encode for NSPoint { - const ENCODING: Encoding<'static> = + const ENCODING: Encoding = Encoding::Struct("CGPoint", &[CGFloat::ENCODING, CGFloat::ENCODING]); } @@ -80,7 +80,7 @@ mod macos { } unsafe impl Encode for NSSize { - const ENCODING: Encoding<'static> = + const ENCODING: Encoding = Encoding::Struct("CGSize", &[CGFloat::ENCODING, CGFloat::ENCODING]); } @@ -116,7 +116,7 @@ mod macos { } unsafe impl Encode for NSRect { - const ENCODING: Encoding<'static> = + const ENCODING: Encoding = Encoding::Struct("CGRect", &[NSPoint::ENCODING, NSSize::ENCODING]); } @@ -161,7 +161,7 @@ pub struct NSRange { } unsafe impl Encode for NSRange { - const ENCODING: Encoding<'static> = + const ENCODING: Encoding = Encoding::Struct("_NSRange", &[NSUInteger::ENCODING, NSUInteger::ENCODING]); } @@ -209,7 +209,7 @@ pub struct NSOperatingSystemVersion { } unsafe impl Encode for NSOperatingSystemVersion { - const ENCODING: Encoding<'static> = Encoding::Struct( + const ENCODING: Encoding = Encoding::Struct( "NSOperatingSystemVersion", &[ NSUInteger::ENCODING, @@ -681,7 +681,7 @@ struct NSFastEnumerationState { } unsafe impl Encode for NSFastEnumerationState { - const ENCODING: Encoding<'static> = Encoding::Struct( + const ENCODING: Encoding = Encoding::Struct( "?", &[ libc::c_ulong::ENCODING, @@ -693,7 +693,7 @@ unsafe impl Encode for NSFastEnumerationState { } unsafe impl RefEncode for NSFastEnumerationState { - const ENCODING_REF: Encoding<'static> = Encoding::Pointer(&Self::ENCODING); + const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING); } const NS_FAST_ENUM_BUF_SIZE: usize = 16; diff --git a/cocoa-foundation/src/lib.rs b/cocoa-foundation/src/lib.rs index 02dc7030..a22b6269 100644 --- a/cocoa-foundation/src/lib.rs +++ b/cocoa-foundation/src/lib.rs @@ -26,7 +26,7 @@ pub use objc2_encode as __objc2_encode; macro_rules! impl_Encode { ($t:ty, $delegation:ty) => { unsafe impl $crate::__objc2_encode::Encode for $t { - const ENCODING: $crate::__objc2_encode::Encoding<'static> = <$delegation>::ENCODING; + const ENCODING: $crate::__objc2_encode::Encoding = <$delegation>::ENCODING; } } } diff --git a/cocoa/Cargo.toml b/cocoa/Cargo.toml index be246065..9510cea4 100644 --- a/cocoa/Cargo.toml +++ b/cocoa/Cargo.toml @@ -12,12 +12,12 @@ license = "MIT / Apache-2.0" default-target = "x86_64-apple-darwin" [dependencies] -block = { version = "=0.2.0-alpha.5", package = "block2" } +block = { version = "=0.2.0-alpha.6", package = "block2" } bitflags = "1.0" libc = "0.2" cocoa-foundation = { path = "../cocoa-foundation", version = "0.1" } core-foundation = { path = "../core-foundation", version = "0.9" } core-graphics = { path = "../core-graphics", version = "0.22" } foreign-types = "0.3" -objc2 = { version = "=0.3.0-beta.1" } -objc2-encode = { version = "=2.0.0-pre.1" } +objc2 = { version = "=0.3.0-beta.2" } +objc2-encode = { version = "=2.0.0-pre.2" } diff --git a/cocoa/src/quartzcore.rs b/cocoa/src/quartzcore.rs index c5ba88ce..13e669cb 100644 --- a/cocoa/src/quartzcore.rs +++ b/cocoa/src/quartzcore.rs @@ -1632,7 +1632,7 @@ pub mod transaction { #[inline] pub fn set_completion_block(block: ConcreteBlock<(), (), F>) - where F: 'static + IntoConcreteBlock<(), Ret = ()> { + where F: 'static + IntoConcreteBlock<(), Output = ()> { unsafe { let block = block.copy(); msg_send![class!(CATransaction), setCompletionBlock:&*block] @@ -1668,7 +1668,7 @@ pub struct CATransform3D { } unsafe impl ::objc2_encode::Encode for CATransform3D { - const ENCODING: ::objc2_encode::Encoding<'static> = ::objc2_encode::Encoding::Array(16, &CGFloat::ENCODING); + const ENCODING: ::objc2_encode::Encoding = ::objc2_encode::Encoding::Array(16, &CGFloat::ENCODING); } impl PartialEq for CATransform3D { @@ -1824,7 +1824,7 @@ pub struct CVTimeStamp { } unsafe impl ::objc2_encode::Encode for CVTimeStamp { - const ENCODING: ::objc2_encode::Encoding<'static> = ::objc2_encode::Encoding::Struct( + const ENCODING: ::objc2_encode::Encoding = ::objc2_encode::Encoding::Struct( "CVTimeStamp", &[ u32::ENCODING, @@ -1841,7 +1841,7 @@ unsafe impl ::objc2_encode::Encode for CVTimeStamp { } unsafe impl ::objc2_encode::RefEncode for CVTimeStamp { - const ENCODING_REF: ::objc2_encode::Encoding<'static> = + const ENCODING_REF: ::objc2_encode::Encoding = ::objc2_encode::Encoding::Pointer(&::ENCODING); } @@ -1874,7 +1874,7 @@ pub struct CVSMPTETime { } unsafe impl ::objc2_encode::Encode for CVSMPTETime { - const ENCODING: ::objc2_encode::Encoding<'static> = ::objc2_encode::Encoding::Struct( + const ENCODING: ::objc2_encode::Encoding = ::objc2_encode::Encoding::Struct( "CVSMPTETime", &[ i16::ENCODING, diff --git a/core-foundation-sys/Cargo.toml b/core-foundation-sys/Cargo.toml index 816fb2cb..a11c4188 100644 --- a/core-foundation-sys/Cargo.toml +++ b/core-foundation-sys/Cargo.toml @@ -8,7 +8,7 @@ authors = ["The Servo Project Developers"] license = "MIT / Apache-2.0" [dependencies] -objc2-encode = { version = "=2.0.0-pre.1" } +objc2-encode = { version = "=2.0.0-pre.2" } [features] mac_os_10_7_support = [] # backwards compatibility diff --git a/core-foundation-sys/src/array.rs b/core-foundation-sys/src/array.rs index 2e0bad0f..f899432f 100644 --- a/core-foundation-sys/src/array.rs +++ b/core-foundation-sys/src/array.rs @@ -36,7 +36,7 @@ pub type CFArrayRef = *const __CFArray; pub type CFMutableArrayRef = *mut __CFArray; unsafe impl ::objc2_encode::RefEncode for __CFArray { - const ENCODING_REF: ::objc2_encode::Encoding<'static> = ::objc2_encode::Encoding::Object; + const ENCODING_REF: ::objc2_encode::Encoding = ::objc2_encode::Encoding::Object; } extern { diff --git a/core-foundation-sys/src/attributed_string.rs b/core-foundation-sys/src/attributed_string.rs index 5f4b984e..8101c6bc 100644 --- a/core-foundation-sys/src/attributed_string.rs +++ b/core-foundation-sys/src/attributed_string.rs @@ -19,7 +19,7 @@ pub type CFAttributedStringRef = *const __CFAttributedString; pub type CFMutableAttributedStringRef = *const __CFAttributedString; unsafe impl ::objc2_encode::RefEncode for __CFAttributedString { - const ENCODING_REF: ::objc2_encode::Encoding<'static> = ::objc2_encode::Encoding::Object; + const ENCODING_REF: ::objc2_encode::Encoding = ::objc2_encode::Encoding::Object; } extern { diff --git a/core-foundation-sys/src/dictionary.rs b/core-foundation-sys/src/dictionary.rs index 90df209e..d88d33e5 100644 --- a/core-foundation-sys/src/dictionary.rs +++ b/core-foundation-sys/src/dictionary.rs @@ -48,7 +48,7 @@ pub type CFDictionaryRef = *const __CFDictionary; pub type CFMutableDictionaryRef = *mut __CFDictionary; unsafe impl ::objc2_encode::RefEncode for __CFDictionary { - const ENCODING_REF: ::objc2_encode::Encoding<'static> = ::objc2_encode::Encoding::Object; + const ENCODING_REF: ::objc2_encode::Encoding = ::objc2_encode::Encoding::Object; } extern { diff --git a/core-foundation-sys/src/string.rs b/core-foundation-sys/src/string.rs index d141cbbc..ab1eddf3 100644 --- a/core-foundation-sys/src/string.rs +++ b/core-foundation-sys/src/string.rs @@ -193,7 +193,7 @@ pub struct __CFString(c_void); pub type CFStringRef = *const __CFString; unsafe impl ::objc2_encode::RefEncode for __CFString { - const ENCODING_REF: ::objc2_encode::Encoding<'static> = ::objc2_encode::Encoding::Object; + const ENCODING_REF: ::objc2_encode::Encoding = ::objc2_encode::Encoding::Object; } extern { diff --git a/core-graphics-types/Cargo.toml b/core-graphics-types/Cargo.toml index d4b55611..66833612 100644 --- a/core-graphics-types/Cargo.toml +++ b/core-graphics-types/Cargo.toml @@ -12,7 +12,7 @@ bitflags = "1.0" core-foundation = { path = "../core-foundation", version = "0.9" } foreign-types = "0.3.0" libc = "0.2" -objc2-encode = { version = "=2.0.0-pre.1" } +objc2-encode = { version = "=2.0.0-pre.2" } [package.metadata.docs.rs] default-target = "x86_64-apple-darwin" diff --git a/core-graphics-types/src/geometry.rs b/core-graphics-types/src/geometry.rs index 597deebf..8b0f7e20 100644 --- a/core-graphics-types/src/geometry.rs +++ b/core-graphics-types/src/geometry.rs @@ -41,7 +41,7 @@ pub struct CGSize { } unsafe impl Encode for CGSize { - const ENCODING: Encoding<'static> = + const ENCODING: Encoding = Encoding::Struct("CGSize", &[CGFloat::ENCODING, CGFloat::ENCODING]); } @@ -70,7 +70,7 @@ pub struct CGPoint { } unsafe impl Encode for CGPoint { - const ENCODING: Encoding<'static> = + const ENCODING: Encoding = Encoding::Struct("CGPoint", &[CGFloat::ENCODING, CGFloat::ENCODING]); } @@ -99,7 +99,7 @@ pub struct CGRect { } unsafe impl Encode for CGRect { - const ENCODING: Encoding<'static> = + const ENCODING: Encoding = Encoding::Struct("CGRect", &[CGPoint::ENCODING, CGSize::ENCODING]); } @@ -168,7 +168,7 @@ pub struct CGAffineTransform { } unsafe impl Encode for CGAffineTransform { - const ENCODING: Encoding<'static> = Encoding::Struct( + const ENCODING: Encoding = Encoding::Struct( "CGAffineTransform", &[ CGFloat::ENCODING, diff --git a/core-graphics/Cargo.toml b/core-graphics/Cargo.toml index 789fdc97..2de8a610 100644 --- a/core-graphics/Cargo.toml +++ b/core-graphics/Cargo.toml @@ -18,7 +18,7 @@ core-foundation = { path = "../core-foundation", version = "0.9" } core-graphics-types = { path = "../core-graphics-types", version = "0.1" } foreign-types = "0.3.0" libc = "0.2" -objc2-encode = { version = "=2.0.0-pre.1" } +objc2-encode = { version = "=2.0.0-pre.2" } [package.metadata.docs.rs] default-target = "x86_64-apple-darwin" diff --git a/core-graphics/src/sys.rs b/core-graphics/src/sys.rs index 223577ff..a96f3053 100644 --- a/core-graphics/src/sys.rs +++ b/core-graphics/src/sys.rs @@ -9,7 +9,7 @@ pub type CGImageRef = *mut CGImage; pub struct __CGColor(c_void); unsafe impl RefEncode for __CGColor { - const ENCODING_REF: Encoding<'static> = Encoding::Unknown; + const ENCODING_REF: Encoding = Encoding::Unknown; } pub type CGColorRef = *const __CGColor; @@ -21,7 +21,7 @@ pub enum CGPath {} pub type CGPathRef = *mut CGPath; unsafe impl RefEncode for CGPath { - const ENCODING_REF: Encoding<'static> = Encoding::Unknown; + const ENCODING_REF: Encoding = Encoding::Unknown; } pub enum CGDataProvider {} @@ -34,7 +34,7 @@ pub enum CGContext {} pub type CGContextRef = *mut CGContext; unsafe impl RefEncode for CGContext { - const ENCODING_REF: Encoding<'static> = Encoding::Unknown; + const ENCODING_REF: Encoding = Encoding::Unknown; } pub enum CGGradient {}