rustc/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.rs
2025-01-11 15:57:26 +01:00

17 lines
256 B
Rust

//@ compile-flags: -Znext-solver
#![feature(const_trait_impl)]
#[const_trait]
pub trait Tr {
fn a(&self) {}
fn b(&self) {
().a()
//~^ ERROR the trait bound `(): ~const Tr` is not satisfied
}
}
impl Tr for () {}
fn main() {}