rust/tests/ui/rfcs/rfc-2632-const-trait-impl/const-closures.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
777 B
Plaintext
Raw Normal View History

error: `~const` can only be applied to `#[const_trait]` traits
2023-08-13 04:02:31 -05:00
--> $DIR/const-closures.rs:8:19
2023-07-29 03:20:25 -05:00
|
2023-08-13 04:02:31 -05:00
LL | F: ~const FnOnce() -> u8,
| ^^^^^^^^^^^^^^
2023-07-29 03:20:25 -05:00
error: `~const` can only be applied to `#[const_trait]` traits
2023-08-13 04:02:31 -05:00
--> $DIR/const-closures.rs:9:19
2023-07-29 03:20:25 -05:00
|
2023-08-13 04:02:31 -05:00
LL | F: ~const FnMut() -> u8,
| ^^^^^^^^^^^^^
2023-07-29 03:20:25 -05:00
error: `~const` can only be applied to `#[const_trait]` traits
2023-08-13 04:02:31 -05:00
--> $DIR/const-closures.rs:10:19
2023-07-29 03:20:25 -05:00
|
2023-08-13 04:02:31 -05:00
LL | F: ~const Fn() -> u8,
| ^^^^^^^^^^
error: `~const` can only be applied to `#[const_trait]` traits
2023-08-13 04:02:31 -05:00
--> $DIR/const-closures.rs:23:27
2023-07-29 03:20:25 -05:00
|
2023-08-13 04:02:31 -05:00
LL | const fn answer<F: ~const Fn() -> u8>(f: &F) -> u8 {
| ^^^^^^^^^^
2023-07-29 03:20:25 -05:00
2023-08-13 04:02:31 -05:00
error: aborting due to 4 previous errors
2023-07-29 03:20:25 -05:00