summaryrefslogtreecommitdiffstats
path: root/src/test/ui/typeck/assign-non-lval-mut-ref.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:58 +0000
commita4b7ed7a42c716ab9f05e351f003d589124fd55d (patch)
treeb620cd3f223850b28716e474e80c58059dca5dd4 /src/test/ui/typeck/assign-non-lval-mut-ref.stderr
parentAdding upstream version 1.67.1+dfsg1. (diff)
downloadrustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.tar.xz
rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.zip
Adding upstream version 1.68.2+dfsg1.upstream/1.68.2+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/typeck/assign-non-lval-mut-ref.stderr')
-rw-r--r--src/test/ui/typeck/assign-non-lval-mut-ref.stderr56
1 files changed, 0 insertions, 56 deletions
diff --git a/src/test/ui/typeck/assign-non-lval-mut-ref.stderr b/src/test/ui/typeck/assign-non-lval-mut-ref.stderr
deleted file mode 100644
index cbdc960ba..000000000
--- a/src/test/ui/typeck/assign-non-lval-mut-ref.stderr
+++ /dev/null
@@ -1,56 +0,0 @@
-error[E0070]: invalid left-hand side of assignment
- --> $DIR/assign-non-lval-mut-ref.rs:5:27
- |
-LL | x.last_mut().unwrap() = 2;
- | --------------------- ^
- | |
- | cannot assign to this expression
- |
-help: consider dereferencing here to assign to the mutably borrowed value
- |
-LL | *x.last_mut().unwrap() = 2;
- | +
-
-error[E0368]: binary assignment operation `+=` cannot be applied to type `&mut usize`
- --> $DIR/assign-non-lval-mut-ref.rs:7:5
- |
-LL | x.last_mut().unwrap() += 1;
- | ---------------------^^^^^
- | |
- | cannot use `+=` on type `&mut usize`
- |
-help: `+=` can be used on `usize` if you dereference the left-hand side
- |
-LL | *x.last_mut().unwrap() += 1;
- | +
-
-error[E0308]: mismatched types
- --> $DIR/assign-non-lval-mut-ref.rs:11:9
- |
-LL | let y = x.last_mut().unwrap();
- | --------------------- expected due to this value
-LL | y = 2;
- | ^ expected `&mut usize`, found integer
- |
-help: consider dereferencing here to assign to the mutably borrowed value
- |
-LL | *y = 2;
- | +
-
-error[E0368]: binary assignment operation `+=` cannot be applied to type `&mut usize`
- --> $DIR/assign-non-lval-mut-ref.rs:13:5
- |
-LL | y += 1;
- | -^^^^^
- | |
- | cannot use `+=` on type `&mut usize`
- |
-help: `+=` can be used on `usize` if you dereference the left-hand side
- |
-LL | *y += 1;
- | +
-
-error: aborting due to 4 previous errors
-
-Some errors have detailed explanations: E0070, E0308, E0368.
-For more information about an error, try `rustc --explain E0070`.