1 // Tests that bindings to move-by-default values trigger moves of the
2 // discriminant. Also tests that the compiler explains the move in
3 // terms of the binding, not the discriminant.
6 fn guard(_s: String) -> bool {panic!()}
10 let x = Foo {f: "hi".to_string()};
16 touch(&x); //~ ERROR use of partially moved value: `x`
17 //~^ value used here after move
18 //~| move occurs because `x.f` has type `std::string::String`