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