rust/tests/ui/rfc-2632-const-trait-impl/issue-88155.rs
2023-01-11 09:32:08 +00:00

14 lines
209 B
Rust

#![feature(const_trait_impl)]
pub trait A {
fn assoc() -> bool;
}
pub const fn foo<T: A>() -> bool {
T::assoc()
//~^ ERROR the trait bound
//~| ERROR cannot call non-const fn
}
fn main() {}