rust/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-88155.rs

16 lines
244 B
Rust
Raw Normal View History

2023-07-27 10:51:02 -05:00
// known-bug: #110395
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()
2023-07-27 10:51:02 -05:00
//FIXME ~^ ERROR the trait bound
//FIXME ~| ERROR cannot call non-const fn
2021-08-26 12:58:28 -05:00
}
fn main() {}