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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
209 B
Rust
Raw Normal View History

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()
//~^ ERROR the trait bound
//~| ERROR cannot call non-const fn
2021-08-26 17:58:28 +00:00
}
fn main() {}