]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/issues/issue-5239-1.stderr
Rollup merge of #62337 - Mark-Simulacrum:fix-cpu-usage-script, r=alexcrichton
[rust.git] / src / test / ui / issues / issue-5239-1.stderr
index 7ae01fb7d6012996c1e80ebb82038431117b6aaa..a95014fb12de7c47da1e5090b9d162635f26facf 100644 (file)
@@ -1,12 +1,14 @@
 error[E0368]: binary assignment operation `+=` cannot be applied to type `&isize`
-  --> $DIR/issue-5239-1.rs:14:30
+  --> $DIR/issue-5239-1.rs:4:30
    |
 LL |     let x = |ref x: isize| { x += 1; };
    |                              -^^^^^
    |                              |
    |                              cannot use `+=` on type `&isize`
+help: `+=` can be used on 'isize', you can dereference `x`
    |
-   = help: `+=` can be used on 'isize', you can dereference `x`: `*x`
+LL |     let x = |ref x: isize| { *x += 1; };
+   |                              ^^
 
 error: aborting due to previous error