about summary refs log tree commit diff
path: root/tests/ui/cmse-nonsecure/cmse-nonsecure-call/generics.stderr
blob: 7cb8e135ea31b10192ae1da0619ad09c3bc526e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
error: function pointer types may not have generic parameters
  --> $DIR/generics.rs:15:42
   |
LL |     f1: extern "C-cmse-nonsecure-call" fn<U: Copy>(U, u32, u32, u32) -> u64,
   |                                          ^^^^^^^^^

error[E0412]: cannot find type `U` in this scope
  --> $DIR/generics.rs:15:52
   |
LL | struct Test<T: Copy> {
   |             - similarly named type parameter `T` defined here
LL |     f1: extern "C-cmse-nonsecure-call" fn<U: Copy>(U, u32, u32, u32) -> u64,
   |                                                    ^
   |
help: a type parameter with a similar name exists
   |
LL |     f1: extern "C-cmse-nonsecure-call" fn<U: Copy>(T, u32, u32, u32) -> u64,
   |                                                    ~
help: you might be missing a type parameter
   |
LL | struct Test<T: Copy, U> {
   |                    +++

error[E0562]: `impl Trait` is not allowed in `fn` pointer parameters
  --> $DIR/generics.rs:18:43
   |
LL |     f2: extern "C-cmse-nonsecure-call" fn(impl Copy, u32, u32, u32) -> u64,
   |                                           ^^^^^^^^^
   |
   = note: `impl Trait` is only allowed in arguments and return types of functions and methods

error[E0798]: function pointers with the `"C-cmse-nonsecure-call"` ABI cannot contain generics in their type
  --> $DIR/generics.rs:20:9
   |
LL |     f3: extern "C-cmse-nonsecure-call" fn(T, u32, u32, u32) -> u64,
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0798]: function pointers with the `"C-cmse-nonsecure-call"` ABI cannot contain generics in their type
  --> $DIR/generics.rs:21:9
   |
LL |     f4: extern "C-cmse-nonsecure-call" fn(Wrapper<T>, u32, u32, u32) -> u64,
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0798]: return value of `"C-cmse-nonsecure-call"` function too large to pass via registers
  --> $DIR/generics.rs:27:73
   |
LL | type WithTraitObject = extern "C-cmse-nonsecure-call" fn(&dyn Trait) -> &dyn Trait;
   |                                                                         ^^^^^^^^^^ this type doesn't fit in the available registers
   |
   = note: functions with the `"C-cmse-nonsecure-call"` ABI must pass their result via the available return registers
   = note: the result must either be a (transparently wrapped) i64, u64 or f64, or be at most 4 bytes in size

error[E0798]: return value of `"C-cmse-nonsecure-call"` function too large to pass via registers
  --> $DIR/generics.rs:31:62
   |
LL |     extern "C-cmse-nonsecure-call" fn(&'static dyn Trait) -> &'static dyn Trait;
   |                                                              ^^^^^^^^^^^^^^^^^^ this type doesn't fit in the available registers
   |
   = note: functions with the `"C-cmse-nonsecure-call"` ABI must pass their result via the available return registers
   = note: the result must either be a (transparently wrapped) i64, u64 or f64, or be at most 4 bytes in size

error[E0798]: return value of `"C-cmse-nonsecure-call"` function too large to pass via registers
  --> $DIR/generics.rs:38:62
   |
LL |     extern "C-cmse-nonsecure-call" fn(WrapperTransparent) -> WrapperTransparent;
   |                                                              ^^^^^^^^^^^^^^^^^^ this type doesn't fit in the available registers
   |
   = note: functions with the `"C-cmse-nonsecure-call"` ABI must pass their result via the available return registers
   = note: the result must either be a (transparently wrapped) i64, u64 or f64, or be at most 4 bytes in size

error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
  --> $DIR/generics.rs:41:20
   |
LL | type WithVarArgs = extern "C-cmse-nonsecure-call" fn(u32, ...);
   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention

error: aborting due to 9 previous errors

Some errors have detailed explanations: E0045, E0412, E0562, E0798.
For more information about an error, try `rustc --explain E0045`.