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.

11 lines
238 B
Rust
Raw Normal View History

2024-10-21 19:37:48 +00:00
//@ compile-flags: -Znext-solver
2023-08-06 13:20:55 +00:00
#![feature(const_trait_impl, effects)]
2024-10-21 19:37:48 +00:00
#![allow(incomplete_features)]
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() {}