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