diff options
author | Sebastian Imlay <sebastian.imlay@gmail.com> | 2022-03-07 16:14:52 -0500 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2022-03-15 03:38:57 +0100 |
commit | 6a169f21344d541ab4790dee894d2cc9e51a0345 (patch) | |
tree | fb9c316035bacc2f38640d81493051ed7b02fb40 /src/codegen | |
parent | f34e4103f304500c96d332f5cecc9067c980d0f9 (diff) |
Fix macOS test expectations
* Updated tests/expectations/Cargo.toml to use 2018 rust.
* Added Debug and Copy to objective-c structs.
* Fixed lifetimes in objective-c trait templates.
* Fixed imports for objective-c expectations tests.
Diffstat (limited to 'src/codegen')
-rw-r--r-- | src/codegen/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs index ffb21d13..a0a0670c 100644 --- a/src/codegen/mod.rs +++ b/src/codegen/mod.rs @@ -4129,7 +4129,7 @@ impl CodeGenerator for ObjCInterface { .collect(); quote! { - pub trait #trait_name <#(#template_names),*> : #trait_constraints { + pub trait #trait_name <#(#template_names:'static),*> : #trait_constraints { #( #impl_items )* } } @@ -4145,7 +4145,7 @@ impl CodeGenerator for ObjCInterface { if !self.is_category() && !self.is_protocol() { let struct_block = quote! { #[repr(transparent)] - #[derive(Clone)] + #[derive(Debug, Copy, Clone)] pub struct #class_name(pub id); impl std::ops::Deref for #class_name { type Target = objc::runtime::Object; @@ -4159,7 +4159,7 @@ impl CodeGenerator for ObjCInterface { impl #class_name { pub fn alloc() -> Self { Self(unsafe { - msg_send!(objc::class!(#class_name), alloc) + msg_send!(class!(#class_name), alloc) }) } } @@ -4381,7 +4381,7 @@ pub mod utils { } } else { quote! { - use objc; + use objc::{self, msg_send, sel, sel_impl, class}; } }; |