fork/rust
git clone https://git.julia.blue/fork/rust
4fb7144ed15
1.43.0
1error[E0382]: use of moved value: `x` 2 --> $DIR/issue-34721.rs:27:9 3 | 4LL | pub fn baz<T: Foo>(x: T) -> T { 5 | - move occurs because `x` has type `T`, which does not implement the `Copy` trait 6LL | if 0 == 1 { 7LL | bar::bar(x.zero()) 8 | - value moved here 9LL | } else { 10LL | x.zero() 11 | - value moved here 12LL | }; 13LL | x.zero() 14 | ^ value used here after move 15 | 16help: consider further restricting this bound with `+ Copy` 17 --> $DIR/issue-34721.rs:21:19 18 | 19LL | pub fn baz<T: Foo>(x: T) -> T { 20 | ^^^ 21 22error: aborting due to previous error 23 24For more information about this error, try `rustc --explain E0382`.