summaryrefslogtreecommitdiffstats
path: root/src/test/ui/moves
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/moves')
-rw-r--r--src/test/ui/moves/issue-72649-uninit-in-loop.stderr10
-rw-r--r--src/test/ui/moves/move-into-dead-array-1.stderr5
-rw-r--r--src/test/ui/moves/move-of-addr-of-mut.stderr4
-rw-r--r--src/test/ui/moves/move-out-of-slice-2.stderr2
4 files changed, 20 insertions, 1 deletions
diff --git a/src/test/ui/moves/issue-72649-uninit-in-loop.stderr b/src/test/ui/moves/issue-72649-uninit-in-loop.stderr
index c7373b5be..974994223 100644
--- a/src/test/ui/moves/issue-72649-uninit-in-loop.stderr
+++ b/src/test/ui/moves/issue-72649-uninit-in-loop.stderr
@@ -47,6 +47,11 @@ LL | let value: NonCopy;
| ----- binding declared here but left uninitialized
LL | let _used = value;
| ^^^^^ `value` used here but it isn't initialized
+ |
+help: consider assigning a value
+ |
+LL | let value: NonCopy = todo!();
+ | +++++++++
error[E0381]: used binding `value` isn't initialized
--> $DIR/issue-72649-uninit-in-loop.rs:69:21
@@ -56,6 +61,11 @@ LL | let mut value: NonCopy;
LL | loop {
LL | let _used = value;
| ^^^^^ `value` used here but it isn't initialized
+ |
+help: consider assigning a value
+ |
+LL | let mut value: NonCopy = todo!();
+ | +++++++++
error: aborting due to 6 previous errors
diff --git a/src/test/ui/moves/move-into-dead-array-1.stderr b/src/test/ui/moves/move-into-dead-array-1.stderr
index 344a6bbf0..6db0f0bcb 100644
--- a/src/test/ui/moves/move-into-dead-array-1.stderr
+++ b/src/test/ui/moves/move-into-dead-array-1.stderr
@@ -5,6 +5,11 @@ LL | let mut a: [D; 4];
| ----- binding declared here but left uninitialized
LL | a[i] = d();
| ^^^^ `a` used here but it isn't initialized
+ |
+help: consider assigning a value
+ |
+LL | let mut a: [D; 4] = todo!();
+ | +++++++++
error: aborting due to previous error
diff --git a/src/test/ui/moves/move-of-addr-of-mut.stderr b/src/test/ui/moves/move-of-addr-of-mut.stderr
index e75f2b1c0..ddebaa012 100644
--- a/src/test/ui/moves/move-of-addr-of-mut.stderr
+++ b/src/test/ui/moves/move-of-addr-of-mut.stderr
@@ -7,6 +7,10 @@ LL | std::ptr::addr_of_mut!(x);
| ^^^^^^^^^^^^^^^^^^^^^^^^^ `x` used here but it isn't initialized
|
= note: this error originates in the macro `std::ptr::addr_of_mut` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: consider assigning a value
+ |
+LL | let mut x: S = todo!();
+ | +++++++++
error: aborting due to previous error
diff --git a/src/test/ui/moves/move-out-of-slice-2.stderr b/src/test/ui/moves/move-out-of-slice-2.stderr
index 93b0dcfc2..46357ce6f 100644
--- a/src/test/ui/moves/move-out-of-slice-2.stderr
+++ b/src/test/ui/moves/move-out-of-slice-2.stderr
@@ -4,8 +4,8 @@ warning: the feature `unsized_locals` is incomplete and may not be safe to use a
LL | #![feature(unsized_locals)]
| ^^^^^^^^^^^^^^
|
- = note: `#[warn(incomplete_features)]` on by default
= note: see issue #48055 <https://github.com/rust-lang/rust/issues/48055> for more information
+ = note: `#[warn(incomplete_features)]` on by default
error[E0508]: cannot move out of type `[A]`, a non-copy slice
--> $DIR/move-out-of-slice-2.rs:10:11