diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/traits/default-method/auxiliary/xc_2.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/ui/traits/default-method/auxiliary/xc_2.rs b/src/test/ui/traits/default-method/auxiliary/xc_2.rs new file mode 100644 index 000000000..979233820 --- /dev/null +++ b/src/test/ui/traits/default-method/auxiliary/xc_2.rs @@ -0,0 +1,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 +} |