1 error[E0382]: use of moved value: `x`
2 --> $DIR/issue-34721.rs:27:9
4 LL | pub fn baz<T: Foo>(x: T) -> T {
5 | - move occurs because `x` has type `T`, which does not implement the `Copy` trait
7 LL | bar::bar(x.zero())
8 | ------ `x` moved due to this method call
11 | ------ `x` moved due to this method call
14 | ^ value used here after move
16 note: this function takes ownership of the receiver `self`, which moves `x`
17 --> $DIR/issue-34721.rs:4:13
19 LL | fn zero(self) -> Self;
21 help: consider further restricting this bound
23 LL | pub fn baz<T: Foo + Copy>(x: T) -> T {
26 error: aborting due to previous error
28 For more information about this error, try `rustc --explain E0382`.