@@ -22,26 +22,59 @@ LL | struct Test<T: Copy, U> {
2222 | +++
2323
2424error[E0562]: `impl Trait` is not allowed in `fn` pointer parameters
25- --> $DIR/generics.rs:17 :43
25+ --> $DIR/generics.rs:18 :43
2626 |
2727LL | f2: extern "C-cmse-nonsecure-call" fn(impl Copy, u32, u32, u32) -> u64,
2828 | ^^^^^^^^^
2929 |
3030 = note: `impl Trait` is only allowed in arguments and return types of functions and methods
3131
3232error[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
3434 |
3535LL | f3: extern "C-cmse-nonsecure-call" fn(T, u32, u32, u32) -> u64,
3636 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3737
3838error[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
4040 |
4141LL | f4: extern "C-cmse-nonsecure-call" fn(Wrapper<T>, u32, u32, u32) -> u64,
4242 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4343
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
4578
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