2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2015-05-20 21:22:05 +03:00
|
|
|
pub trait Foo {
|
|
|
|
fn method1() {}
|
|
|
|
fn method2();
|
|
|
|
}
|
|
|
|
|
2022-07-25 22:36:03 +02:00
|
|
|
struct Slice<'a, T: 'a>(#[allow(unused_tuple_struct_fields)] &'a [T]);
|
2015-05-20 21:22:05 +03:00
|
|
|
|
|
|
|
impl<'a, T: 'a> Foo for Slice<'a, T> {
|
|
|
|
fn method2() {
|
|
|
|
<Self as Foo>::method1();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
<Slice<()> as Foo>::method2();
|
|
|
|
}
|