@@ -210,7 +210,7 @@ macro_rules! msg_send_id {
210
210
$crate:: __msg_send_inner! {
211
211
@id NAME ,
212
212
$crate:: __msg_send_inner! {
213
- @call <__Assert<ALLOC , INIT , RETAINED >>:: __send_super_message_id( $obj, $superclass, sel, ( ) )
213
+ @call <__Assert<ALLOC , INIT , RETAINED > as __MsgSendId<_ , _> >:: __send_super_message_id( $obj, $superclass, sel, ( ) )
214
214
}
215
215
}
216
216
} ) ;
@@ -221,7 +221,7 @@ macro_rules! msg_send_id {
221
221
$crate:: __msg_send_inner! {
222
222
@id NAME ,
223
223
$crate:: __msg_send_inner! {
224
- @call <__Assert<ALLOC , INIT , RETAINED >>:: __send_super_message_id( $obj, $superclass, sel, ( $( $arg, ) +) )
224
+ @call <__Assert<ALLOC , INIT , RETAINED > as __MsgSendId<_ , _> >:: __send_super_message_id( $obj, $superclass, sel, ( $( $arg, ) +) )
225
225
}
226
226
}
227
227
} ) ;
@@ -232,7 +232,7 @@ macro_rules! msg_send_id {
232
232
$crate:: __msg_send_inner! {
233
233
@id NAME ,
234
234
$crate:: __msg_send_inner! {
235
- @call <__Assert<ALLOC , INIT , RETAINED >>:: __send_message_id( $obj, sel, ( ) )
235
+ @call <__Assert<ALLOC , INIT , RETAINED > as __MsgSendId<_ , _> >:: __send_message_id( $obj, sel, ( ) )
236
236
}
237
237
}
238
238
} ) ;
@@ -243,7 +243,7 @@ macro_rules! msg_send_id {
243
243
$crate:: __msg_send_inner! {
244
244
@id NAME ,
245
245
$crate:: __msg_send_inner! {
246
- @call <__Assert<ALLOC , INIT , RETAINED >>:: __send_message_id( $obj, sel, ( $( $arg, ) +) )
246
+ @call <__Assert<ALLOC , INIT , RETAINED > as __MsgSendId<_ , _> >:: __send_message_id( $obj, sel, ( $( $arg, ) +) )
247
247
}
248
248
}
249
249
} ) ;
@@ -289,4 +289,20 @@ mod tests {
289
289
assert ! ( !__starts_with_str( b"abcdef" , b"abb" ) ) ;
290
290
assert ! ( !__starts_with_str( b"" , b"a" ) ) ;
291
291
}
292
+
293
+ mod test_ {
294
+ use super :: * ;
295
+
296
+ trait Abc {
297
+ fn __send_message_id ( ) { }
298
+ }
299
+
300
+ impl < T > Abc for T { }
301
+
302
+ #[ test]
303
+ fn test_macro_still_works ( ) {
304
+ let cls = class ! ( NSObject ) ;
305
+ let _obj: Id < Object , Owned > = unsafe { msg_send_id ! [ cls, new] . unwrap ( ) } ;
306
+ }
307
+ }
292
308
}
0 commit comments