rust/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-requires-const-trait.rs

12 lines
240 B
Rust
Raw Normal View History

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