rust/tests/ui/rfc-2632-const-trait-impl/default-method-body-is-const-body-checking.rs

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

18 lines
275 B
Rust
Raw Normal View History

#![feature(const_trait_impl)]
#[const_trait]
trait Tr {}
impl Tr for () {}
const fn foo<T>() where T: ~const Tr {}
#[const_trait]
pub trait Foo {
fn foo() {
foo::<()>();
//~^ ERROR the trait bound `(): ~const Tr` is not satisfied
}
}
fn main() {}