@@ -5,8 +5,7 @@ use core::ops::Deref;
5
5
use core:: ptr;
6
6
use std:: os:: raw:: c_ulong;
7
7
8
- use objc2:: encode:: __unstable:: EncodeReturn ;
9
- use objc2:: encode:: { Encode , Encoding , RefEncode } ;
8
+ use objc2:: encode:: { EncodeArgument , EncodeReturn , Encoding , RefEncode } ;
10
9
11
10
use crate :: { ffi, Block , BlockArguments , RcBlock } ;
12
11
@@ -17,7 +16,8 @@ mod private {
17
16
/// Types that may be converted into a [`ConcreteBlock`].
18
17
///
19
18
/// This is implemented for [`Fn`] closures of up to 12 arguments, where each
20
- /// argument and the return type implements [`Encode`].
19
+ /// argument implements [`EncodeArgument`] and the return type implements
20
+ /// [`EncodeReturn`].
21
21
///
22
22
///
23
23
/// # Safety
@@ -37,12 +37,12 @@ macro_rules! concrete_block_impl {
37
37
concrete_block_impl!( $f, ) ;
38
38
) ;
39
39
( $f: ident, $( $a: ident : $t: ident) ,* ) => (
40
- impl <$( $t: Encode , ) * R : EncodeReturn , X > private:: Sealed <( $( $t, ) * ) > for X
40
+ impl <$( $t: EncodeArgument , ) * R : EncodeReturn , X > private:: Sealed <( $( $t, ) * ) > for X
41
41
where
42
42
X : Fn ( $( $t, ) * ) -> R ,
43
43
{ }
44
44
45
- unsafe impl <$( $t: Encode , ) * R : EncodeReturn , X > IntoConcreteBlock <( $( $t, ) * ) > for X
45
+ unsafe impl <$( $t: EncodeArgument , ) * R : EncodeReturn , X > IntoConcreteBlock <( $( $t, ) * ) > for X
46
46
where
47
47
X : Fn ( $( $t, ) * ) -> R ,
48
48
{
0 commit comments