rust/tests/ui/traits/const-traits/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
198 B
Rust
Raw Normal View History

2024-10-21 19:37:48 +00:00
//@ compile-flags: -Znext-solver
2024-10-30 18:03:44 +00:00
#![feature(const_trait_impl)]
2022-08-28 04:17:12 +00:00
pub trait A {}
impl const A for () {}
2024-10-21 19:37:48 +00:00
//~^ ERROR: const `impl` for trait `A` which is not marked with `#[const_trait]`
2022-08-28 04:17:12 +00:00
fn main() {}