@@ -22,26 +22,59 @@ LL | struct Test<T: Copy, U> {
22
22
| +++
23
23
24
24
error[E0562]: `impl Trait` is not allowed in `fn` pointer parameters
25
- --> $DIR/generics.rs:17 :43
25
+ --> $DIR/generics.rs:18 :43
26
26
|
27
27
LL | f2: extern "C-cmse-nonsecure-call" fn(impl Copy, u32, u32, u32) -> u64,
28
28
| ^^^^^^^^^
29
29
|
30
30
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
31
31
32
32
error[E0798]: function pointers with the `"C-cmse-nonsecure-call"` ABI cannot contain generics in their type
33
- --> $DIR/generics.rs:19 :9
33
+ --> $DIR/generics.rs:20 :9
34
34
|
35
35
LL | f3: extern "C-cmse-nonsecure-call" fn(T, u32, u32, u32) -> u64,
36
36
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
37
37
38
38
error[E0798]: function pointers with the `"C-cmse-nonsecure-call"` ABI cannot contain generics in their type
39
- --> $DIR/generics.rs:20 :9
39
+ --> $DIR/generics.rs:21 :9
40
40
|
41
41
LL | f4: extern "C-cmse-nonsecure-call" fn(Wrapper<T>, u32, u32, u32) -> u64,
42
42
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
43
43
44
- error: aborting due to 5 previous errors
44
+ error[E0798]: return value of `"C-cmse-nonsecure-call"` function too large to pass via registers
45
+ --> $DIR/generics.rs:27:73
46
+ |
47
+ LL | type WithTraitObject = extern "C-cmse-nonsecure-call" fn(&dyn Trait) -> &dyn Trait;
48
+ | ^^^^^^^^^^ this type doesn't fit in the available registers
49
+ |
50
+ = note: functions with the `"C-cmse-nonsecure-call"` ABI must pass their result via the available return registers
51
+ = note: the result must either be a (transparently wrapped) i64, u64 or f64, or be at most 4 bytes in size
52
+
53
+ error[E0798]: return value of `"C-cmse-nonsecure-call"` function too large to pass via registers
54
+ --> $DIR/generics.rs:31:62
55
+ |
56
+ LL | extern "C-cmse-nonsecure-call" fn(&'static dyn Trait) -> &'static dyn Trait;
57
+ | ^^^^^^^^^^^^^^^^^^ this type doesn't fit in the available registers
58
+ |
59
+ = note: functions with the `"C-cmse-nonsecure-call"` ABI must pass their result via the available return registers
60
+ = note: the result must either be a (transparently wrapped) i64, u64 or f64, or be at most 4 bytes in size
61
+
62
+ error[E0798]: return value of `"C-cmse-nonsecure-call"` function too large to pass via registers
63
+ --> $DIR/generics.rs:38:62
64
+ |
65
+ LL | extern "C-cmse-nonsecure-call" fn(WrapperTransparent) -> WrapperTransparent;
66
+ | ^^^^^^^^^^^^^^^^^^ this type doesn't fit in the available registers
67
+ |
68
+ = note: functions with the `"C-cmse-nonsecure-call"` ABI must pass their result via the available return registers
69
+ = note: the result must either be a (transparently wrapped) i64, u64 or f64, or be at most 4 bytes in size
70
+
71
+ error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
72
+ --> $DIR/generics.rs:41:20
73
+ |
74
+ LL | type WithVarArgs = extern "C-cmse-nonsecure-call" fn(u32, ...);
75
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
76
+
77
+ error: aborting due to 9 previous errors
45
78
46
- Some errors have detailed explanations: E0412, E0562, E0798.
47
- For more information about an error, try `rustc --explain E0412 `.
79
+ Some errors have detailed explanations: E0045, E0412, E0562, E0798.
80
+ For more information about an error, try `rustc --explain E0045 `.
0 commit comments