2021-08-26 12:58:28 -05:00
|
|
|
#![feature(const_trait_impl)]
|
|
|
|
|
|
|
|
pub trait A {
|
|
|
|
fn assoc() -> bool;
|
|
|
|
}
|
|
|
|
|
|
|
|
pub const fn foo<T: A>() -> bool {
|
|
|
|
T::assoc()
|
2022-01-28 04:57:29 -06:00
|
|
|
//~^ ERROR the trait bound
|
|
|
|
//~| ERROR cannot call non-const fn
|
2021-08-26 12:58:28 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|