Commit 48f774b 1 parent 225380e commit 48f774b Copy full SHA for 48f774b
File tree 2 files changed +9
-4
lines changed
SwiftRustIntegrationTestRunner/SwiftRustIntegrationTestRunner
crates/swift-integration-tests/src
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 6
6
//
7
7
8
8
func swift_func_takes_callback_with_result_arg(
9
- arg: ( RustResult < CallbackTestOpaqueRustType , String > ) -> ( )
9
+ arg: ( RustResult < CallbackTestOpaqueRustType , String > ) -> Void
10
10
) {
11
11
arg ( . Ok( CallbackTestOpaqueRustType ( 555 ) ) )
12
12
}
13
13
14
14
public class ResultTestOpaqueSwiftType {
15
15
var num : UInt32
16
-
16
+
17
17
init ( val: UInt32 ) {
18
18
self . num = val
19
19
}
20
-
20
+
21
21
func val( ) -> UInt32 {
22
22
self . num
23
23
}
24
24
}
25
25
26
+ extension AsyncRustFnReturnStruct : @unchecked Sendable { }
27
+
26
28
extension ResultTestOpaqueRustType : @unchecked Sendable { }
27
29
extension ResultTestOpaqueRustType : Error { }
28
30
@@ -41,5 +43,7 @@ extension ResultTransparentStruct: Error {}
41
43
extension SameEnum : @unchecked Sendable { }
42
44
extension SameEnum : Error { }
43
45
46
+ extension AsyncResultOkEnum : @unchecked Sendable { }
47
+
44
48
extension AsyncResultErrEnum : @unchecked Sendable { }
45
49
extension AsyncResultErrEnum : Error { }
Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ mod ffi {
13
13
extern "Rust" {
14
14
async fn rust_async_return_null ( ) ;
15
15
async fn rust_async_reflect_u8 ( arg : u8 ) -> u8 ;
16
- async fn rust_async_reflect_string ( string : String ) -> String ;
16
+ // TODO: this is broken because RustString is not Sendable.
17
+ // async fn rust_async_reflect_string(string: String) -> String;
17
18
async fn rust_async_return_struct ( ) -> AsyncRustFnReturnStruct ;
18
19
async fn rust_async_func_reflect_result_opaque_rust (
19
20
arg : Result < AsyncResultOpaqueRustType1 , AsyncResultOpaqueRustType2 > ,
You can’t perform that action at this time.
0 commit comments