2019-01-02 18:56:45 -06:00
|
|
|
error[E0382]: use of moved value: `x`
|
2019-04-07 10:07:36 -05:00
|
|
|
--> $DIR/issue-34721.rs:25:9
|
2019-01-02 18:56:45 -06:00
|
|
|
|
|
|
|
|
LL | pub fn baz<T: Foo>(x: T) -> T {
|
2019-01-06 17:23:30 -06:00
|
|
|
| - - move occurs because `x` has type `T`, which does not implement the `Copy` trait
|
|
|
|
| |
|
|
|
|
| consider adding a `Copy` constraint to this type argument
|
2019-01-02 18:56:45 -06:00
|
|
|
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`.
|