rust/tests/ui/traits/const-traits/call-const-in-tilde-const.rs
2024-11-03 18:59:31 +00:00

14 lines
242 B
Rust

//@ compile-flags: -Znext-solver
#![feature(const_trait_impl)]
#[const_trait] trait Foo {
fn foo();
}
const fn foo<T: ~const Foo>() {
const { T::foo() }
//~^ ERROR the trait bound `T: const Foo` is not satisfied
}
fn main() {}