Suppose we have a protocol P with method f(&self) -> Id<NSObject, Shared>. If we use declare_class! to implement this protocol for a new type...
declare_class!(
struct C {
// This is unrelated to this ticket but I can't figure out how to do empty structs in `declare_class`
filler: u8
}
unsafe impl ConformsTo<P> for C {
#[method(f)]
fn f(&self) -> Id<NSObject, Shared> {
unimplemented!()
}
}
)
We see
the trait Encodeis not implemented foricrate::objc2::rc::Id<NSObject, Shared>`
in the macro expansion because it generates
<Id<NSObject, Shared> as $crate::encode::EncodeConvert>::__into_inner({
$crate::panicking::panic("not implemented")
})
And Id<_, _> doesn't implement EncodeConvert
Suppose we have a protocol
Pwith methodf(&self) -> Id<NSObject, Shared>. If we usedeclare_class!to implement this protocol for a new type...We see
the traitEncodeis not implemented foricrate::objc2::rc::Id<NSObject, Shared>`in the macro expansion because it generates
And
Id<_, _>doesn't implementEncodeConvert