]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/issues/issue-71381.min.stderr
Rollup merge of #106707 - ehuss:remove-dupe-sha-1, r=Mark-Simulacrum
[rust.git] / tests / ui / const-generics / issues / issue-71381.min.stderr
1 error[E0770]: the type of const parameters must not depend on other generic parameters
2   --> $DIR/issue-71381.rs:14:82
3    |
4 LL |     pub fn call_me<Args: Sized, const IDX: usize, const FN: unsafe extern "C" fn(Args)>(&self) {
5    |                                                                                  ^^^^ the type must not depend on the parameter `Args`
6
7 error[E0770]: the type of const parameters must not depend on other generic parameters
8   --> $DIR/issue-71381.rs:23:40
9    |
10 LL |         const FN: unsafe extern "C" fn(Args),
11    |                                        ^^^^ the type must not depend on the parameter `Args`
12
13 error: using function pointers as const generic parameters is forbidden
14   --> $DIR/issue-71381.rs:14:61
15    |
16 LL |     pub fn call_me<Args: Sized, const IDX: usize, const FN: unsafe extern "C" fn(Args)>(&self) {
17    |                                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
18
19 error: using function pointers as const generic parameters is forbidden
20   --> $DIR/issue-71381.rs:23:19
21    |
22 LL |         const FN: unsafe extern "C" fn(Args),
23    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
24
25 error: aborting due to 4 previous errors
26
27 For more information about this error, try `rustc --explain E0770`.