blob: b2ddf1ba541e62b3ca9ca2a00d17dbb17af74f05 [file] [log] [blame]
//@ compile-flags: -Znext-solver
#![feature(const_trait_impl)]
const trait ConstDefaultFn: Sized {
fn b(self);
fn a(self) {
self.b();
}
}
struct NonConstImpl;
struct ConstImpl;
impl ConstDefaultFn for NonConstImpl {
fn b(self) {}
}
impl const ConstDefaultFn for ConstImpl {
fn b(self) {}
}
const fn test() {
NonConstImpl.a();
//~^ ERROR the trait bound `NonConstImpl: [const] ConstDefaultFn` is not satisfied
ConstImpl.a();
}
fn main() {}