mirror of
https://github.com/rust-lang/rust.git
synced 2026-01-21 06:40:41 +00:00
Done with ```bash sd '//@ pretty-expanded.*\n' '' tests/ui/**/*.rs ``` and ``` sd '//@pretty-expanded.*\n' '' tests/ui/**/*.rs ```
24 lines
202 B
Rust
24 lines
202 B
Rust
//@ 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();
|
|
}
|