@@ -15,6 +15,20 @@ LL | f7: extern "C-cmse-nonsecure-call" fn() -> i128,
15
15
|
16
16
= note: 128-bit integers don't currently have a known stable ABI
17
17
18
+ warning: `extern` fn uses type `ReprRustUnionU64`, which is not FFI-safe
19
+ --> $DIR/return-via-stack.rs:55:9
20
+ |
21
+ LL | f1: extern "C-cmse-nonsecure-call" fn() -> ReprRustUnionU64,
22
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
23
+ |
24
+ = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this union
25
+ = note: this union has unspecified layout
26
+ note: the type is defined here
27
+ --> $DIR/return-via-stack.rs:49:1
28
+ |
29
+ LL | pub union ReprRustUnionU64 {
30
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
31
+
18
32
error[E0798]: return value of `C-cmse-nonsecure-call` function too large to pass via registers
19
33
--> $DIR/return-via-stack.rs:34:5
20
34
|
@@ -92,6 +106,28 @@ LL | f7();
92
106
|
93
107
= note: functions with the `C-cmse-nonsecure-call` ABI must pass their result via the available return registers
94
108
95
- error: aborting due to 7 previous errors; 2 warnings emitted
109
+ error[E0798]: return value of `C-cmse-nonsecure-call` function too large to pass via registers
110
+ --> $DIR/return-via-stack.rs:58:5
111
+ |
112
+ LL | f1: extern "C-cmse-nonsecure-call" fn() -> ReprRustUnionU64,
113
+ | -- this function uses the `C-cmse-nonsecure-call` ABI
114
+ ...
115
+ LL | f1();
116
+ | ^^^^ but its return value doesn't fit in the available registers
117
+ |
118
+ = note: functions with the `C-cmse-nonsecure-call` ABI must pass their result via the available return registers
119
+
120
+ error[E0798]: return value of `C-cmse-nonsecure-call` function too large to pass via registers
121
+ --> $DIR/return-via-stack.rs:59:5
122
+ |
123
+ LL | f2: extern "C-cmse-nonsecure-call" fn() -> ReprCUnionU64,
124
+ | -- this function uses the `C-cmse-nonsecure-call` ABI
125
+ ...
126
+ LL | f2();
127
+ | ^^^^ but its return value doesn't fit in the available registers
128
+ |
129
+ = note: functions with the `C-cmse-nonsecure-call` ABI must pass their result via the available return registers
130
+
131
+ error: aborting due to 9 previous errors; 3 warnings emitted
96
132
97
133
For more information about this error, try `rustc --explain E0798`.
0 commit comments