about summary refs log tree commit diff
path: root/tests/ui/issues/issue-24308.rs
blob: 40950938fc712b18b0efffb24e4d2b59833b0162 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// run-pass
pub trait Foo {
    fn method1() {}
    fn method2();
}

struct Slice<'a, T: 'a>(#[allow(dead_code)] &'a [T]);

impl<'a, T: 'a> Foo for Slice<'a, T> {
    fn method2() {
        <Self as Foo>::method1();
    }
}

fn main() {
    <Slice<()> as Foo>::method2();
}