summaryrefslogtreecommitdiffstats
path: root/src/test/ui/liveness
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:11:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:12:43 +0000
commitcf94bdc0742c13e2a0cac864c478b8626b266e1b (patch)
tree044670aa50cc5e2b4229aa0b6b3df6676730c0a6 /src/test/ui/liveness
parentAdding debian version 1.65.0+dfsg1-2. (diff)
downloadrustc-cf94bdc0742c13e2a0cac864c478b8626b266e1b.tar.xz
rustc-cf94bdc0742c13e2a0cac864c478b8626b266e1b.zip
Merging upstream version 1.66.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/test/ui/liveness/liveness-asm.stderr2
-rw-r--r--src/test/ui/liveness/liveness-consts.stderr4
-rw-r--r--src/test/ui/liveness/liveness-dead.stderr2
-rw-r--r--src/test/ui/liveness/liveness-return-last-stmt-semi.rs1
-rw-r--r--src/test/ui/liveness/liveness-return-last-stmt-semi.stderr10
-rw-r--r--src/test/ui/liveness/liveness-unused.stderr2
-rw-r--r--src/test/ui/liveness/liveness-upvars.stderr4
7 files changed, 12 insertions, 13 deletions
diff --git a/src/test/ui/liveness/liveness-asm.stderr b/src/test/ui/liveness/liveness-asm.stderr
index d052aca33..57d89e44d 100644
--- a/src/test/ui/liveness/liveness-asm.stderr
+++ b/src/test/ui/liveness/liveness-asm.stderr
@@ -4,12 +4,12 @@ warning: value assigned to `src` is never read
LL | asm!("/*{0}*/", inout(reg) src);
| ^^^
|
+ = help: maybe it is overwritten before being read?
note: the lint level is defined here
--> $DIR/liveness-asm.rs:7:9
|
LL | #![warn(unused_assignments)]
| ^^^^^^^^^^^^^^^^^^
- = help: maybe it is overwritten before being read?
warning: value assigned to `src` is never read
--> $DIR/liveness-asm.rs:24:39
diff --git a/src/test/ui/liveness/liveness-consts.stderr b/src/test/ui/liveness/liveness-consts.stderr
index 16209d16c..6199ea96c 100644
--- a/src/test/ui/liveness/liveness-consts.stderr
+++ b/src/test/ui/liveness/liveness-consts.stderr
@@ -4,13 +4,13 @@ warning: variable `a` is assigned to, but never used
LL | let mut a = 0;
| ^
|
+ = note: consider using `_a` instead
note: the lint level is defined here
--> $DIR/liveness-consts.rs:2:9
|
LL | #![warn(unused)]
| ^^^^^^
= note: `#[warn(unused_variables)]` implied by `#[warn(unused)]`
- = note: consider using `_a` instead
warning: value assigned to `b` is never read
--> $DIR/liveness-consts.rs:17:5
@@ -18,8 +18,8 @@ warning: value assigned to `b` is never read
LL | b += 1;
| ^
|
- = note: `#[warn(unused_assignments)]` implied by `#[warn(unused)]`
= help: maybe it is overwritten before being read?
+ = note: `#[warn(unused_assignments)]` implied by `#[warn(unused)]`
warning: unused variable: `e`
--> $DIR/liveness-consts.rs:24:13
diff --git a/src/test/ui/liveness/liveness-dead.stderr b/src/test/ui/liveness/liveness-dead.stderr
index 12680ab11..de6d5bd99 100644
--- a/src/test/ui/liveness/liveness-dead.stderr
+++ b/src/test/ui/liveness/liveness-dead.stderr
@@ -4,12 +4,12 @@ error: value assigned to `x` is never read
LL | let mut x: isize = 3;
| ^
|
+ = help: maybe it is overwritten before being read?
note: the lint level is defined here
--> $DIR/liveness-dead.rs:2:9
|
LL | #![deny(unused_assignments)]
| ^^^^^^^^^^^^^^^^^^
- = help: maybe it is overwritten before being read?
error: value assigned to `x` is never read
--> $DIR/liveness-dead.rs:17:5
diff --git a/src/test/ui/liveness/liveness-return-last-stmt-semi.rs b/src/test/ui/liveness/liveness-return-last-stmt-semi.rs
index e8909c4a5..dff859429 100644
--- a/src/test/ui/liveness/liveness-return-last-stmt-semi.rs
+++ b/src/test/ui/liveness/liveness-return-last-stmt-semi.rs
@@ -1,4 +1,3 @@
-//
// regression test for #8005
macro_rules! test { () => { fn foo() -> i32 { 1; } } }
diff --git a/src/test/ui/liveness/liveness-return-last-stmt-semi.stderr b/src/test/ui/liveness/liveness-return-last-stmt-semi.stderr
index 82d136bd3..de0843aa6 100644
--- a/src/test/ui/liveness/liveness-return-last-stmt-semi.stderr
+++ b/src/test/ui/liveness/liveness-return-last-stmt-semi.stderr
@@ -1,5 +1,5 @@
error[E0308]: mismatched types
- --> $DIR/liveness-return-last-stmt-semi.rs:7:19
+ --> $DIR/liveness-return-last-stmt-semi.rs:6:19
|
LL | fn no_return() -> i32 {}
| --------- ^^^ expected `i32`, found `()`
@@ -7,17 +7,17 @@ LL | fn no_return() -> i32 {}
| implicitly returns `()` as its body has no tail or `return` expression
error[E0308]: mismatched types
- --> $DIR/liveness-return-last-stmt-semi.rs:9:19
+ --> $DIR/liveness-return-last-stmt-semi.rs:8:19
|
LL | fn bar(x: u32) -> u32 {
| --- ^^^ expected `u32`, found `()`
| |
| implicitly returns `()` as its body has no tail or `return` expression
LL | x * 2;
- | - help: remove this semicolon
+ | - help: remove this semicolon to return this value
error[E0308]: mismatched types
- --> $DIR/liveness-return-last-stmt-semi.rs:13:19
+ --> $DIR/liveness-return-last-stmt-semi.rs:12:19
|
LL | fn baz(x: u64) -> u32 {
| --- ^^^ expected `u32`, found `()`
@@ -25,7 +25,7 @@ LL | fn baz(x: u64) -> u32 {
| implicitly returns `()` as its body has no tail or `return` expression
error[E0308]: mismatched types
- --> $DIR/liveness-return-last-stmt-semi.rs:4:41
+ --> $DIR/liveness-return-last-stmt-semi.rs:3:41
|
LL | macro_rules! test { () => { fn foo() -> i32 { 1; } } }
| --- ^^^ expected `i32`, found `()`
diff --git a/src/test/ui/liveness/liveness-unused.stderr b/src/test/ui/liveness/liveness-unused.stderr
index 4a6122681..f6c478ddb 100644
--- a/src/test/ui/liveness/liveness-unused.stderr
+++ b/src/test/ui/liveness/liveness-unused.stderr
@@ -57,12 +57,12 @@ error: value assigned to `x` is never read
LL | x += 4;
| ^
|
+ = help: maybe it is overwritten before being read?
note: the lint level is defined here
--> $DIR/liveness-unused.rs:3:9
|
LL | #![deny(unused_assignments)]
| ^^^^^^^^^^^^^^^^^^
- = help: maybe it is overwritten before being read?
error: variable `z` is assigned to, but never used
--> $DIR/liveness-unused.rs:37:13
diff --git a/src/test/ui/liveness/liveness-upvars.stderr b/src/test/ui/liveness/liveness-upvars.stderr
index cb104e0a3..82f62371e 100644
--- a/src/test/ui/liveness/liveness-upvars.stderr
+++ b/src/test/ui/liveness/liveness-upvars.stderr
@@ -4,13 +4,13 @@ warning: value assigned to `last` is never read
LL | last = Some(s);
| ^^^^
|
+ = help: maybe it is overwritten before being read?
note: the lint level is defined here
--> $DIR/liveness-upvars.rs:4:9
|
LL | #![warn(unused)]
| ^^^^^^
= note: `#[warn(unused_assignments)]` implied by `#[warn(unused)]`
- = help: maybe it is overwritten before being read?
warning: unused variable: `last`
--> $DIR/liveness-upvars.rs:10:9
@@ -18,8 +18,8 @@ warning: unused variable: `last`
LL | last = Some(s);
| ^^^^
|
- = note: `#[warn(unused_variables)]` implied by `#[warn(unused)]`
= help: did you mean to capture by reference instead?
+ = note: `#[warn(unused_variables)]` implied by `#[warn(unused)]`
warning: unused variable: `sum`
--> $DIR/liveness-upvars.rs:22:9