@@ -25,25 +25,33 @@ LL | struct Test<T: Copy, U> {
25
25
error[E0562]: `impl Trait` is not allowed in `fn` pointer parameters
26
26
--> $DIR/generics.rs:17:41
27
27
|
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 ,
29
29
| ^^^^^^^^^
30
30
|
31
31
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
32
32
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
+
33
41
error[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
35
43
|
36
44
LL | f3: extern "cmse-nonsecure-call" fn(T, u32, u32, u32) -> u64,
37
45
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38
46
39
47
error[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
41
49
|
42
50
LL | f4: extern "cmse-nonsecure-call" fn(Wrapper<T>, u32, u32, u32) -> u64,
43
51
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44
52
45
53
error[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
47
55
|
48
56
LL | type WithTraitObject = extern "cmse-nonsecure-call" fn(&dyn Trait) -> &dyn Trait;
49
57
| ^^^^^^^^^^ this type doesn't fit in the available registers
@@ -52,7 +60,7 @@ LL | type WithTraitObject = extern "cmse-nonsecure-call" fn(&dyn Trait) -> &dyn
52
60
= note: the result must either be a (transparently wrapped) i64, u64 or f64, or be at most 4 bytes in size
53
61
54
62
error[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
56
64
|
57
65
LL | extern "cmse-nonsecure-call" fn(&'static dyn Trait) -> &'static dyn Trait;
58
66
| ^^^^^^^^^^^^^^^^^^ 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
61
69
= note: the result must either be a (transparently wrapped) i64, u64 or f64, or be at most 4 bytes in size
62
70
63
71
error[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
65
73
|
66
74
LL | extern "cmse-nonsecure-call" fn(WrapperTransparent) -> WrapperTransparent;
67
75
| ^^^^^^^^^^^^^^^^^^ this type doesn't fit in the available registers
@@ -70,12 +78,12 @@ LL | extern "cmse-nonsecure-call" fn(WrapperTransparent) -> WrapperTranspare
70
78
= note: the result must either be a (transparently wrapped) i64, u64 or f64, or be at most 4 bytes in size
71
79
72
80
error[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
74
82
|
75
83
LL | type WithVarArgs = extern "cmse-nonsecure-call" fn(u32, ...);
76
84
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
77
85
78
- error: aborting due to 9 previous errors
86
+ error: aborting due to 10 previous errors
79
87
80
88
Some errors have detailed explanations: E0045, E0412, E0562, E0798.
81
89
For more information about an error, try `rustc --explain E0045`.
0 commit comments