blob: 6d61b23e4b7c3a4b0e46dcd34e0082b7cd521d6a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
error: ~const can only be applied to `#[const_trait]` traits
--> $DIR/const-closures.rs:8:19
|
LL | F: ~const FnOnce() -> u8,
| ^^^^^^^^^^^^^^
error: ~const can only be applied to `#[const_trait]` traits
--> $DIR/const-closures.rs:9:19
|
LL | F: ~const FnMut() -> u8,
| ^^^^^^^^^^^^^
error: ~const can only be applied to `#[const_trait]` traits
--> $DIR/const-closures.rs:10:19
|
LL | F: ~const Fn() -> u8,
| ^^^^^^^^^^
error: ~const can only be applied to `#[const_trait]` traits
--> $DIR/const-closures.rs:23:27
|
LL | const fn answer<F: ~const Fn() -> u8>(f: &F) -> u8 {
| ^^^^^^^^^^
error: aborting due to 4 previous errors
|