2021-08-26 17:58:28 +00:00
|
|
|
#![feature(const_trait_impl)]
|
|
|
|
|
|
|
|
|
|
pub trait A {
|
|
|
|
|
fn assoc() -> bool;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pub const fn foo<T: A>() -> bool {
|
|
|
|
|
T::assoc()
|
2025-07-11 09:55:05 +00:00
|
|
|
//~^ ERROR cannot call non-const associated function
|
2021-08-26 17:58:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|