32 lines
1.5 KiB
Plaintext
32 lines
1.5 KiB
Plaintext
error[E0770]: the type of const parameters must not depend on other generic parameters
|
|
--> $DIR/issue-71381.rs:14:82
|
|
|
|
|
LL | pub fn call_me<Args: Sized, const IDX: usize, const FN: unsafe extern "C" fn(Args)>(&self) {
|
|
| ^^^^ the type must not depend on the parameter `Args`
|
|
|
|
|
= note: type parameters may not be used in the type of const parameters
|
|
|
|
error[E0770]: the type of const parameters must not depend on other generic parameters
|
|
--> $DIR/issue-71381.rs:24:40
|
|
|
|
|
LL | const FN: unsafe extern "C" fn(Args),
|
|
| ^^^^ the type must not depend on the parameter `Args`
|
|
|
|
|
= note: type parameters may not be used in the type of const parameters
|
|
|
|
error[E0594]: cannot assign to `self.0`, which is behind a `&` reference
|
|
--> $DIR/issue-71381.rs:17:9
|
|
|
|
|
LL | self.0 = Self::trampiline::<Args, IDX, FN> as _
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `self` is a `&` reference, so the data it refers to cannot be written
|
|
|
|
|
help: consider changing this to be a mutable reference
|
|
|
|
|
LL | pub fn call_me<Args: Sized, const IDX: usize, const FN: unsafe extern "C" fn(Args)>(&mut self) {
|
|
| ~~~~~~~~~
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
Some errors have detailed explanations: E0594, E0770.
|
|
For more information about an error, try `rustc --explain E0594`.
|