2022-08-28 04:17:12 +00:00
|
|
|
error: const `impl`s must be for traits marked with `#[const_trait]`
|
|
|
|
|
--> $DIR/const-impl-requires-const-trait.rs:6:1
|
|
|
|
|
|
|
|
|
|
|
LL | impl const A for () {}
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
|
|
note: this trait must be annotated with `#[const_trait]`
|
|
|
|
|
--> $DIR/const-impl-requires-const-trait.rs:3:1
|
|
|
|
|
|
|
|
|
|
|
LL | pub trait A {}
|
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
2022-10-03 17:08:42 +00:00
|
|
|
error: ~const can only be applied to `#[const_trait]` traits
|
|
|
|
|
--> $DIR/const-impl-requires-const-trait.rs:6:12
|
|
|
|
|
|
|
|
|
|
|
LL | impl const A for () {}
|
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
2022-08-28 04:17:12 +00:00
|
|
|
|