about summary refs log tree commit diff
path: root/tests/ui/traits/trait-implementation-restriction-5988.rs
blob: d3a5b10569b22a81c191574fc0b266991c02a6b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// https://github.com/rust-lang/rust/issues/5988
//@ run-pass

trait B {
    fn f(&self);
}

trait T : B {
}

struct A;

impl<U: T> B for U {
    fn f(&self) { }
}

impl T for A {
}

fn main() {
    let a = A;
    let br = &a as &dyn B;
    br.f();
}