@@ -25,25 +25,33 @@ LL | struct Test<T: Copy, U> {
2525error[E0562]: `impl Trait` is not allowed in `fn` pointer parameters
2626 --> $DIR/generics.rs:17:41
2727 |
28- LL | f2: extern "cmse-nonsecure-call" fn(impl Copy, u32, u32, u32) -> u64 ,
28+ LL | f2: extern "cmse-nonsecure-call" fn(impl Copy, u32, u32, u32) -> impl Copy ,
2929 | ^^^^^^^^^
3030 |
3131 = note: `impl Trait` is only allowed in arguments and return types of functions and methods
3232
33+ error[E0562]: `impl Trait` is not allowed in `fn` pointer return types
34+ --> $DIR/generics.rs:17:70
35+ |
36+ LL | f2: extern "cmse-nonsecure-call" fn(impl Copy, u32, u32, u32) -> impl Copy,
37+ | ^^^^^^^^^
38+ |
39+ = note: `impl Trait` is only allowed in arguments and return types of functions and methods
40+
3341error[E0798]: function pointers with the `"cmse-nonsecure-call"` ABI cannot contain generics in their type
34- --> $DIR/generics.rs:19 :9
42+ --> $DIR/generics.rs:20 :9
3543 |
3644LL | f3: extern "cmse-nonsecure-call" fn(T, u32, u32, u32) -> u64,
3745 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3846
3947error[E0798]: function pointers with the `"cmse-nonsecure-call"` ABI cannot contain generics in their type
40- --> $DIR/generics.rs:20 :9
48+ --> $DIR/generics.rs:21 :9
4149 |
4250LL | f4: extern "cmse-nonsecure-call" fn(Wrapper<T>, u32, u32, u32) -> u64,
4351 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4452
4553error[E0798]: return value of `"cmse-nonsecure-call"` function too large to pass via registers
46- --> $DIR/generics.rs:26 :71
54+ --> $DIR/generics.rs:27 :71
4755 |
4856LL | type WithTraitObject = extern "cmse-nonsecure-call" fn(&dyn Trait) -> &dyn Trait;
4957 | ^^^^^^^^^^ this type doesn't fit in the available registers
@@ -52,7 +60,7 @@ LL | type WithTraitObject = extern "cmse-nonsecure-call" fn(&dyn Trait) -> &dyn
5260 = note: the result must either be a (transparently wrapped) i64, u64 or f64, or be at most 4 bytes in size
5361
5462error[E0798]: return value of `"cmse-nonsecure-call"` function too large to pass via registers
55- --> $DIR/generics.rs:30 :60
63+ --> $DIR/generics.rs:31 :60
5664 |
5765LL | extern "cmse-nonsecure-call" fn(&'static dyn Trait) -> &'static dyn Trait;
5866 | ^^^^^^^^^^^^^^^^^^ this type doesn't fit in the available registers
@@ -61,7 +69,7 @@ LL | extern "cmse-nonsecure-call" fn(&'static dyn Trait) -> &'static dyn Tra
6169 = note: the result must either be a (transparently wrapped) i64, u64 or f64, or be at most 4 bytes in size
6270
6371error[E0798]: return value of `"cmse-nonsecure-call"` function too large to pass via registers
64- --> $DIR/generics.rs:37 :60
72+ --> $DIR/generics.rs:38 :60
6573 |
6674LL | extern "cmse-nonsecure-call" fn(WrapperTransparent) -> WrapperTransparent;
6775 | ^^^^^^^^^^^^^^^^^^ this type doesn't fit in the available registers
@@ -70,12 +78,12 @@ LL | extern "cmse-nonsecure-call" fn(WrapperTransparent) -> WrapperTranspare
7078 = note: the result must either be a (transparently wrapped) i64, u64 or f64, or be at most 4 bytes in size
7179
7280error[E0045]: C-variadic functions with the "cmse-nonsecure-call" calling convention are not supported
73- --> $DIR/generics.rs:40 :20
81+ --> $DIR/generics.rs:41 :20
7482 |
7583LL | type WithVarArgs = extern "cmse-nonsecure-call" fn(u32, ...);
7684 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
7785
78- error: aborting due to 9 previous errors
86+ error: aborting due to 10 previous errors
7987
8088Some errors have detailed explanations: E0045, E0412, E0562, E0798.
8189For more information about an error, try `rustc --explain E0045`.
0 commit comments