]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/issues/issue-34721.stderr
Use structured suggestion when requiring `Copy` constraint in type param
[rust.git] / src / test / ui / issues / issue-34721.stderr
index d5cede990a335116a3d8f631ae19745d6da8c0b7..abf65afd7ed9846e0df1073d3a018d88f10fa061 100644 (file)
@@ -1,10 +1,10 @@
 error[E0382]: use of moved value: `x`
-  --> $DIR/issue-34721.rs:25:9
+  --> $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
+   |                --      - move occurs because `x` has type `T`, which does not implement the `Copy` trait
    |                |
-   |                consider adding a `Copy` constraint to this type argument
+   |                help: consider adding a `Copy` constraint to this type argument: `T: Copy +`
 LL |         if 0 == 1 {
 LL |             bar::bar(x.zero())
    |                      - value moved here