mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-01 17:04:13 +00:00
13 lines
195 B
Rust
13 lines
195 B
Rust
#![feature(const_trait_impl)]
|
|
|
|
pub trait A {
|
|
fn assoc() -> bool;
|
|
}
|
|
|
|
pub const fn foo<T: A>() -> bool {
|
|
T::assoc()
|
|
//~^ ERROR cannot call non-const associated function
|
|
}
|
|
|
|
fn main() {}
|