rust/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
256 B
Rust
Raw Normal View History

//@ compile-flags: -Znext-solver
2024-10-30 18:03:44 +00:00
#![feature(const_trait_impl)]
2022-01-11 23:52:24 +08:00
#[const_trait]
2022-01-11 23:52:24 +08:00
pub trait Tr {
fn a(&self) {}
fn b(&self) {
().a()
//~^ ERROR the trait bound `(): ~const Tr` is not satisfied
2022-01-11 23:52:24 +08:00
}
}
impl Tr for () {}
fn main() {}