about summary refs log tree commit diff
path: root/tests/ui/traits/default-method/auxiliary/xc_2.rs
blob: aa185d560f21805b8ec641b3f871867f212649e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//@ aux-build:xc.rs

extern crate xc as aux;
use aux::A;

pub struct a_struct { pub x: isize }

impl A for a_struct {
    fn f(&self) -> isize { 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
}