@@ -7,13 +7,29 @@ LL | pub fn call_me<Args: Sized, const IDX: usize, const FN: unsafe extern "
7
7
= note: type parameters may not be used in the type of const parameters
8
8
9
9
error[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
11
11
|
12
12
LL | const FN: unsafe extern "C" fn(Args),
13
13
| ^^^^ the type must not depend on the parameter `Args`
14
14
|
15
15
= note: type parameters may not be used in the type of const parameters
16
16
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
18
34
19
35
For more information about this error, try `rustc --explain E0770`.
0 commit comments