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

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

10 lines
220 B
Rust
Raw Normal View History

2022-08-28 04:17:12 +00:00
#![feature(const_trait_impl)]
pub trait A {}
//~^ NOTE: this trait must be annotated with `#[const_trait]`
impl const A for () {}
//~^ ERROR: const `impl`s must be for traits marked with `#[const_trait]`
fn main() {}