]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | // run-pass |
0bf4aa26 | 2 | #![allow(dead_code)] |
6a06907d | 3 | // aux-build:auto_xc.rs |
223e47cc | 4 | |
c34b1796 | 5 | |
6a06907d | 6 | extern crate auto_xc as aux; |
223e47cc LB |
7 | |
8 | use aux::{Foo, Bar, Baz, Quux}; | |
9 | ||
c34b1796 | 10 | struct A { x: isize } |
223e47cc | 11 | |
c34b1796 AL |
12 | impl Foo for A { fn f(&self) -> isize { 10 } } |
13 | impl Bar for A { fn g(&self) -> isize { 20 } } | |
14 | impl Baz for A { fn h(&self) -> isize { 30 } } | |
223e47cc LB |
15 | |
16 | fn f<T:Quux>(a: &T) { | |
970d7e83 LB |
17 | assert_eq!(a.f(), 10); |
18 | assert_eq!(a.g(), 20); | |
19 | assert_eq!(a.h(), 30); | |
223e47cc LB |
20 | } |
21 | ||
22 | pub fn main() { | |
23 | let a = &A { x: 3 }; | |
24 | f(a); | |
25 | } |