blob: 3002b07e8c909ce64559ca1ad4575ce668fe03f6 [file] [log] [blame]
error[E0382]: use of moved value: `x`
--> $DIR/issue-34721.rs:27:9
|
LL | pub fn baz<T: Foo>(x: T) -> T {
| -- - move occurs because `x` has type `T`, which does not implement the `Copy` trait
| |
| help: consider further restricting this bound: `T: Copy +`
LL | if 0 == 1 {
LL | bar::bar(x.zero())
| - value moved here
LL | } else {
LL | x.zero()
| - value moved here
LL | };
LL | x.zero()
| ^ value used here after move
error: aborting due to previous error
For more information about this error, try `rustc --explain E0382`.