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.

18 lines
296 B
Rust
Raw Normal View History

//@ compile-flags: -Znext-solver
#![allow(incomplete_features)]
#![feature(const_trait_impl, effects)]
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() {}