2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2015-03-22 15:13:15 -05:00
|
|
|
// pretty-expanded FIXME #23616
|
|
|
|
|
2014-12-07 09:22:06 -06:00
|
|
|
trait B {
|
|
|
|
fn f(&self);
|
|
|
|
}
|
|
|
|
|
|
|
|
trait T : B {
|
|
|
|
}
|
|
|
|
|
|
|
|
struct A;
|
|
|
|
|
|
|
|
impl<U: T> B for U {
|
2015-04-10 13:12:43 -05:00
|
|
|
fn f(&self) { }
|
2014-12-07 09:22:06 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
impl T for A {
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let a = A;
|
2019-05-28 13:47:21 -05:00
|
|
|
let br = &a as &dyn B;
|
2014-12-07 09:22:06 -06:00
|
|
|
br.f();
|
|
|
|
}
|