rust/tests/ui/rfcs/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
194 B
Rust
Raw Normal View History

2022-08-27 23:17:12 -05:00
#![feature(const_trait_impl)]
pub trait A {}
//~^ HELP: mark `A` as const
2022-08-27 23:17:12 -05:00
impl const A for () {}
//~^ ERROR: const `impl` for trait `A` which is not marked with `#[const_trait]`
2022-08-27 23:17:12 -05:00
fn main() {}