@@ -114,7 +114,7 @@ pub unsafe trait MessageReceiver: private::Sealed {
114
114
#[ cfg_attr( feature = "verify_message" , inline( always) ) ]
115
115
unsafe fn send_message < A , R > ( & self , sel : Sel , args : A ) -> Result < R , MessageError >
116
116
where
117
- A : MessageArguments + EncodeArguments ,
117
+ A : MessageArguments ,
118
118
R : Encode ,
119
119
{
120
120
let this = self . as_raw_receiver ( ) ;
@@ -150,7 +150,7 @@ pub unsafe trait MessageReceiver: private::Sealed {
150
150
args : A ,
151
151
) -> Result < R , MessageError >
152
152
where
153
- A : MessageArguments + EncodeArguments ,
153
+ A : MessageArguments ,
154
154
R : Encode ,
155
155
{
156
156
let this = self . as_raw_receiver ( ) ;
@@ -280,7 +280,7 @@ unsafe impl<T: Message, O: Ownership> MessageReceiver for Option<Id<T, O>> {
280
280
}
281
281
282
282
/// Types that may be used as the arguments of an Objective-C message.
283
- pub trait MessageArguments : Sized {
283
+ pub trait MessageArguments : EncodeArguments {
284
284
/// Invoke an [`Imp`] with the given object, selector, and arguments.
285
285
///
286
286
/// This method is the primitive used when sending messages and should not
@@ -291,7 +291,7 @@ pub trait MessageArguments: Sized {
291
291
292
292
macro_rules! message_args_impl {
293
293
( $( $a: ident : $t: ident) ,* ) => (
294
- impl <$( $t) ,* > MessageArguments for ( $( $t, ) * ) {
294
+ impl <$( $t: Encode ) ,* > MessageArguments for ( $( $t, ) * ) {
295
295
unsafe fn invoke<R >( imp: Imp , obj: * mut Object , sel: Sel , ( $( $a, ) * ) : Self ) -> R {
296
296
let imp: unsafe extern fn ( * mut Object , Sel $( , $t) * ) -> R =
297
297
mem:: transmute( imp) ;
0 commit comments