2023-07-27 15:51:02 +00:00
|
|
|
// known-bug: #110395
|
|
|
|
// check-pass
|
|
|
|
|
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::<()>();
|
2023-07-29 08:20:25 +00:00
|
|
|
//FIXME ~^ ERROR the trait bound `(): Tr` is not satisfied
|
2021-12-17 20:39:55 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|