mirror of https://github.com/rust-lang/rust.git
32 lines
1.3 KiB
Plaintext
32 lines
1.3 KiB
Plaintext
error: `~const` can only be applied to `#[const_trait]` traits
|
|
--> $DIR/const-closure-parse-not-item.rs:7:25
|
|
|
|
|
LL | const fn test() -> impl ~const Fn() {
|
|
| ^^^^^^ can't be applied to `Fn`
|
|
|
|
|
note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
|
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
|
|
|
error: `~const` can only be applied to `#[const_trait]` traits
|
|
--> $DIR/const-closure-parse-not-item.rs:7:25
|
|
|
|
|
LL | const fn test() -> impl ~const Fn() {
|
|
| ^^^^^^ can't be applied to `Fn`
|
|
|
|
|
note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
|
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
|
|
error: `~const` can only be applied to `#[const_trait]` traits
|
|
--> $DIR/const-closure-parse-not-item.rs:7:25
|
|
|
|
|
LL | const fn test() -> impl ~const Fn() {
|
|
| ^^^^^^ can't be applied to `Fn`
|
|
|
|
|
note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
|
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
|
|
error: aborting due to 3 previous errors
|
|
|