2022-01-11 23:52:24 +08:00
|
|
|
#![feature(const_trait_impl)]
|
|
|
|
|
|
|
|
pub trait Tr {
|
|
|
|
#[default_method_body_is_const]
|
|
|
|
fn a(&self) {}
|
|
|
|
|
|
|
|
#[default_method_body_is_const]
|
|
|
|
fn b(&self) {
|
|
|
|
().a()
|
2022-01-28 21:57:29 +11:00
|
|
|
//~^ ERROR the trait bound
|
|
|
|
//~| ERROR cannot call
|
2022-01-11 23:52:24 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Tr for () {}
|
|
|
|
|
|
|
|
fn main() {}
|