File: generics.stderr

package info (click to toggle)
rustc 1.88.0%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid
  • size: 934,168 kB
  • sloc: xml: 158,127; python: 36,062; javascript: 19,855; sh: 19,700; cpp: 18,947; ansic: 12,993; asm: 4,792; makefile: 690; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (81 lines) | stat: -rw-r--r-- 4,143 bytes parent folder | download | duplicates (5)
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
81
error: function pointer types may not have generic parameters
  --> $DIR/generics.rs:14: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:14: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>(U, u32, u32, u32) -> u64,
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:17: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:19: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:20: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:26: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:30: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:37: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`, `cdecl`, `system`, `aapcs`, `win64`, `sysv64` or `efiapi`
  --> $DIR/generics.rs:40: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`.