rust/tests/ui/traits/const-traits/call-const-in-tilde-const.rs

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

14 lines
242 B
Rust
Raw Normal View History

2024-10-21 20:16:33 +00:00
//@ compile-flags: -Znext-solver
2024-10-30 18:03:44 +00:00
#![feature(const_trait_impl)]
2024-10-21 20:16:33 +00:00
#[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() {}