File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
framework-crates/objc2-core-foundation/src Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ macro_rules! __cf_type_objc2 {
190
190
( impl ( $( $generics: tt) * ) $ty: ty; ) => { } ;
191
191
( impl ( $( $generics: tt) * ) $ty: ty; $encoding: literal) => {
192
192
$crate:: __cf_macro_helpers:: cf_objc2_type!(
193
- unsafe impl $( $generics) * for RefEncode <$encoding> $ty { }
193
+ unsafe impl $( $generics) * RefEncode <$encoding> for $ty { }
194
194
) ;
195
195
} ;
196
196
}
@@ -201,3 +201,15 @@ macro_rules! __cf_type_objc2 {
201
201
macro_rules! __cf_type_objc2 {
202
202
( $( $t: tt) * ) => { } ;
203
203
}
204
+
205
+ #[ cfg( test) ]
206
+ mod tests {
207
+ #[ allow( dead_code) ]
208
+ struct TISInputSource { }
209
+
210
+ // Test old syntax still works (used by dependencies).
211
+ cf_type ! (
212
+ #[ encoding_name = "__TISInputSource" ]
213
+ unsafe impl TISInputSource { }
214
+ ) ;
215
+ }
You can’t perform that action at this time.
0 commit comments