summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/vtable/issue-91807.rs
blob: f435ff09dc3af1123bc9b153b5c6d846904a2a7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// check-pass
// incremental

struct Struct<T>(T);

impl<T> std::ops::Deref for Struct<T> {
    type Target = dyn Fn(T);
    fn deref(&self) -> &Self::Target {
        unimplemented!()
    }
}

fn main() {
    let f = Struct(Default::default());
    f(0);
    f(0);
}