1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
//@ check-pass #![feature(ergonomic_clones)] #![allow(incomplete_features)] use std::clone::UseCloned; fn basic_test(x: i32) -> i32 { x.use.use.abs() } #[derive(Clone)] struct Foo; impl UseCloned for Foo {} fn do_not_move_test(x: Foo) -> Foo { let s = x.use; x } fn main() {}