2021-12-17 20:39:55 +08:00
|
|
|
#![feature(const_trait_impl)]
|
|
|
|
|
2022-10-03 17:08:42 +00:00
|
|
|
#[const_trait]
|
2021-12-17 20:39:55 +08:00
|
|
|
trait Tr {}
|
|
|
|
impl Tr for () {}
|
|
|
|
|
|
|
|
const fn foo<T>() where T: ~const Tr {}
|
|
|
|
|
2022-03-16 20:49:54 +11:00
|
|
|
#[const_trait]
|
2021-12-17 20:39:55 +08:00
|
|
|
pub trait Foo {
|
|
|
|
fn foo() {
|
|
|
|
foo::<()>();
|
2021-12-24 22:50:44 +08:00
|
|
|
//~^ ERROR the trait bound `(): ~const Tr` is not satisfied
|
2021-12-17 20:39:55 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|