Files
rust/src/test/ui/rfc-2632-const-trait-impl/const-impl-requires-const-trait.stderr

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

21 lines
538 B
Plaintext
Raw Normal View History

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 {}
| ^^^^^^^^^^^
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