diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2018-04-12 12:25:29 +0200 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2018-04-18 15:37:18 +0200 |
| commit | ea454746b31cfdd1c9f08b3ea11fff4ef19b58e7 (patch) | |
| tree | 3c740ff9f29cb763ac34a34b393aaa63d2a30c6d /src/test/ui/rfc-2005-default-binding-mode | |
| parent | 02a7809f1c10ceab7ffe4652f1211cdc3c6fd4c1 (diff) | |
| download | rust-ea454746b31cfdd1c9f08b3ea11fff4ef19b58e7.tar.gz rust-ea454746b31cfdd1c9f08b3ea11fff4ef19b58e7.zip | |
Update the previously checkpointed (but unused by bors) tests to reflect current reality.
Diffstat (limited to 'src/test/ui/rfc-2005-default-binding-mode')
| -rw-r--r-- | src/test/ui/rfc-2005-default-binding-mode/enum.nll.stderr | 18 | ||||
| -rw-r--r-- | src/test/ui/rfc-2005-default-binding-mode/explicit-mut.nll.stderr | 18 |
2 files changed, 24 insertions, 12 deletions
diff --git a/src/test/ui/rfc-2005-default-binding-mode/enum.nll.stderr b/src/test/ui/rfc-2005-default-binding-mode/enum.nll.stderr index 6ae5f777a93..b97bdeea409 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/enum.nll.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/enum.nll.stderr @@ -1,20 +1,26 @@ -error[E0594]: cannot assign to immutable item `*x` +error[E0594]: cannot assign to data in a `&` reference --> $DIR/enum.rs:19:5 | +LL | let Wrap(x) = &Wrap(3); + | - help: consider changing this to be a mutable reference: `&mut` LL | *x += 1; //~ ERROR cannot assign to immutable - | ^^^^^^^ cannot mutate + | ^^^^^^^ -error[E0594]: cannot assign to immutable item `*x` +error[E0594]: cannot assign to data in a `&` reference --> $DIR/enum.rs:23:9 | +LL | if let Some(x) = &Some(3) { + | - help: consider changing this to be a mutable reference: `&mut` LL | *x += 1; //~ ERROR cannot assign to immutable - | ^^^^^^^ cannot mutate + | ^^^^^^^ -error[E0594]: cannot assign to immutable item `*x` +error[E0594]: cannot assign to data in a `&` reference --> $DIR/enum.rs:29:9 | +LL | while let Some(x) = &Some(3) { + | - help: consider changing this to be a mutable reference: `&mut` LL | *x += 1; //~ ERROR cannot assign to immutable - | ^^^^^^^ cannot mutate + | ^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.nll.stderr b/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.nll.stderr index 7138c4ac06e..3ee4dc07bb8 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.nll.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.nll.stderr @@ -1,20 +1,26 @@ -error[E0594]: cannot assign to immutable item `*n` +error[E0594]: cannot assign to data in a `&` reference --> $DIR/explicit-mut.rs:17:13 | +LL | Some(n) => { + | - help: consider changing this to be a mutable reference: `&mut` LL | *n += 1; //~ ERROR cannot assign to immutable - | ^^^^^^^ cannot mutate + | ^^^^^^^ -error[E0594]: cannot assign to immutable item `*n` +error[E0594]: cannot assign to data in a `&` reference --> $DIR/explicit-mut.rs:25:13 | +LL | Some(n) => { + | - help: consider changing this to be a mutable reference: `&mut` LL | *n += 1; //~ ERROR cannot assign to immutable - | ^^^^^^^ cannot mutate + | ^^^^^^^ -error[E0594]: cannot assign to immutable item `*n` +error[E0594]: cannot assign to data in a `&` reference --> $DIR/explicit-mut.rs:33:13 | +LL | Some(n) => { + | - help: consider changing this to be a mutable reference: `&mut` LL | *n += 1; //~ ERROR cannot assign to immutable - | ^^^^^^^ cannot mutate + | ^^^^^^^ error: aborting due to 3 previous errors |
