mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-23 21:17:15 +00:00
21 lines
270 B
Rust
21 lines
270 B
Rust
//@ run-pass
|
|
//@ aux-build:xc_call.rs
|
|
|
|
|
|
extern crate xc_call as aux;
|
|
|
|
use aux::Foo;
|
|
|
|
trait Bar : Foo {
|
|
fn g(&self) -> isize;
|
|
}
|
|
|
|
impl Bar for aux::A {
|
|
fn g(&self) -> isize { self.f() }
|
|
}
|
|
|
|
pub fn main() {
|
|
let a = &aux::A { x: 3 };
|
|
assert_eq!(a.g(), 10);
|
|
}
|