2024-02-21 15:50:40 +00:00
|
|
|
#![feature(type_alias_impl_trait)]
|
2024-04-15 11:37:09 +00:00
|
|
|
|
|
|
|
//@ check-pass
|
|
|
|
|
2024-02-21 15:50:40 +00:00
|
|
|
struct Foo<T>(T);
|
|
|
|
|
|
|
|
impl Foo<u32> {
|
|
|
|
fn method() {}
|
|
|
|
fn method2(self) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
type Bar = impl Sized;
|
|
|
|
|
2024-07-26 10:04:02 +00:00
|
|
|
#[define_opaque(Bar)]
|
2024-02-21 15:50:40 +00:00
|
|
|
fn bar() -> Bar {
|
|
|
|
42_u32
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Foo<Bar> {
|
2024-07-26 10:04:02 +00:00
|
|
|
#[define_opaque(Bar)]
|
2024-02-21 15:50:40 +00:00
|
|
|
fn foo() -> Bar {
|
|
|
|
Self::method();
|
|
|
|
Foo::<Bar>::method();
|
|
|
|
let x = Foo(bar());
|
|
|
|
Foo::method2(x);
|
|
|
|
let x = Self(bar());
|
|
|
|
Self::method2(x);
|
|
|
|
todo!()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|