2013-07-11 19:07:57 -05:00
|
|
|
// aux-build:trait_default_method_xc_aux.rs
|
|
|
|
|
2013-12-09 15:56:53 -06:00
|
|
|
extern mod aux = "trait_default_method_xc_aux";
|
2013-07-11 19:07:57 -05:00
|
|
|
use aux::A;
|
|
|
|
|
|
|
|
pub struct a_struct { x: int }
|
|
|
|
|
|
|
|
impl A for a_struct {
|
|
|
|
fn f(&self) -> int { 10 }
|
|
|
|
}
|
|
|
|
|
|
|
|
// This function will need to get inlined, and badness may result.
|
|
|
|
pub fn welp<A>(x: A) -> A {
|
|
|
|
let a = a_struct { x: 0 };
|
|
|
|
a.g();
|
|
|
|
x
|
|
|
|
}
|