rust/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closures.stderr
2023-12-27 12:51:32 +01:00

27 lines
777 B
Plaintext

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