mirror of https://github.com/rust-lang/rust
81 lines
4.0 KiB
Plaintext
81 lines
4.0 KiB
Plaintext
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`.
|