2023-12-17 18:10:16 -06:00
|
|
|
// check-pass
|
2023-08-13 08:59:19 -05:00
|
|
|
#![feature(const_trait_impl, effects)]
|
2022-10-21 08:49:11 -05:00
|
|
|
|
|
|
|
#[const_trait]
|
|
|
|
trait Foo {
|
|
|
|
fn foo(&self) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
struct Bar<T>(T);
|
|
|
|
|
2023-12-17 18:10:16 -06:00
|
|
|
impl<T> Bar<T> {
|
|
|
|
const fn foo(&self) where T: ~const Foo {
|
2022-10-21 08:49:11 -05:00
|
|
|
self.0.foo()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|