2023-12-18 01:10:16 +01:00
|
|
|
//@ check-pass
|
2024-06-30 17:08:45 +00:00
|
|
|
//@ compile-flags: -Znext-solver
|
|
|
|
#![allow(incomplete_features)]
|
|
|
|
#![feature(const_trait_impl, effects)]
|
2022-10-21 13:49:11 +00:00
|
|
|
|
|
|
|
#[const_trait]
|
|
|
|
trait Foo {
|
|
|
|
fn foo(&self) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
struct Bar<T>(T);
|
|
|
|
|
2023-12-18 01:10:16 +01:00
|
|
|
impl<T> Bar<T> {
|
|
|
|
const fn foo(&self) where T: ~const Foo {
|
2022-10-21 13:49:11 +00:00
|
|
|
self.0.foo()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|