]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.stderr
Create fewer basic blocks in match MIR lowering
[rust.git] / src / test / ui / lifetimes / lifetime-errors / liveness-assign-imm-local-notes.stderr
index c646912d3b67950583d857964329692d36846745..13b6a7bbef3213291cbe82ad79445e3b3a545770 100644 (file)
@@ -28,6 +28,9 @@ LL |     let x;
 ...
 LL |             x = 1;
    |             ^^^^^ cannot assign twice to immutable variable
+LL |         } else {
+LL |             x = 2;
+   |             ----- first assignment to `x`
 
 error[E0384]: cannot assign twice to immutable variable `x`
   --> $DIR/liveness-assign-imm-local-notes.rs:32:13
@@ -35,9 +38,6 @@ error[E0384]: cannot assign twice to immutable variable `x`
 LL |     let x;
    |         - help: make this binding mutable: `mut x`
 ...
-LL |             x = 1;
-   |             ----- first assignment to `x`
-LL |         } else {
 LL |             x = 2;
    |             ^^^^^ cannot assign twice to immutable variable