diff options
Diffstat (limited to 'tests/expectations/tests/objc_protocol.rs')
-rw-r--r-- | tests/expectations/tests/objc_protocol.rs | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/tests/expectations/tests/objc_protocol.rs b/tests/expectations/tests/objc_protocol.rs deleted file mode 100644 index 5bd7d433..00000000 --- a/tests/expectations/tests/objc_protocol.rs +++ /dev/null @@ -1,30 +0,0 @@ -#![allow( - dead_code, - non_snake_case, - non_camel_case_types, - non_upper_case_globals -)] -#![cfg(target_os = "macos")] - -use objc::{self, class, msg_send, sel, sel_impl}; -#[allow(non_camel_case_types)] -pub type id = *mut objc::runtime::Object; -pub trait PFoo: Sized + std::ops::Deref {} -#[repr(transparent)] -#[derive(Debug, Copy, Clone)] -pub struct Foo(pub id); -impl std::ops::Deref for Foo { - type Target = objc::runtime::Object; - fn deref(&self) -> &Self::Target { - unsafe { &*self.0 } - } -} -unsafe impl objc::Message for Foo {} -impl Foo { - pub fn alloc() -> Self { - Self(unsafe { msg_send!(class!(Foo), alloc) }) - } -} -impl PFoo for Foo {} -impl IFoo for Foo {} -pub trait IFoo: Sized + std::ops::Deref {} |