@@ -7,13 +7,29 @@ LL | pub fn call_me<Args: Sized, const IDX: usize, const FN: unsafe extern "
77 = note: type parameters may not be used in the type of const parameters
88
99error[E0770]: the type of const parameters must not depend on other generic parameters
10- --> $DIR/issue-71381.rs:22 :40
10+ --> $DIR/issue-71381.rs:23 :40
1111 |
1212LL | const FN: unsafe extern "C" fn(Args),
1313 | ^^^^ the type must not depend on the parameter `Args`
1414 |
1515 = note: type parameters may not be used in the type of const parameters
1616
17- error: aborting due to 2 previous errors
17+ error: using function pointers as const generic parameters is forbidden
18+ --> $DIR/issue-71381.rs:14:61
19+ |
20+ LL | pub fn call_me<Args: Sized, const IDX: usize, const FN: unsafe extern "C" fn(Args)>(&self) {
21+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
22+ |
23+ = note: the only supported types are integers, `bool` and `char`
24+
25+ error: using function pointers as const generic parameters is forbidden
26+ --> $DIR/issue-71381.rs:23:19
27+ |
28+ LL | const FN: unsafe extern "C" fn(Args),
29+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
30+ |
31+ = note: the only supported types are integers, `bool` and `char`
32+
33+ error: aborting due to 4 previous errors
1834
1935For more information about this error, try `rustc --explain E0770`.
0 commit comments