summaryrefslogtreecommitdiffstats
path: root/tests/ui/match
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:43 +0000
commit3e3e70d529d8c7d7c4d7bc4fefc9f109393b9245 (patch)
treedaf049b282ab10e8c3d03e409b3cd84ff3f7690c /tests/ui/match
parentAdding debian version 1.68.2+dfsg1-1. (diff)
downloadrustc-3e3e70d529d8c7d7c4d7bc4fefc9f109393b9245.tar.xz
rustc-3e3e70d529d8c7d7c4d7bc4fefc9f109393b9245.zip
Merging upstream version 1.69.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/match')
-rw-r--r--tests/ui/match/issue-12552.stderr4
-rw-r--r--tests/ui/match/issue-74050-end-span.stderr1
-rw-r--r--tests/ui/match/issue-91058.stderr2
-rw-r--r--tests/ui/match/match-ref-mut-invariance.stderr2
-rw-r--r--tests/ui/match/match-ref-mut-let-invariance.stderr2
-rw-r--r--tests/ui/match/match-struct.rs2
-rw-r--r--tests/ui/match/match-struct.stderr2
-rw-r--r--tests/ui/match/match-tag-nullary.stderr2
-rw-r--r--tests/ui/match/match-tag-unary.stderr2
9 files changed, 10 insertions, 9 deletions
diff --git a/tests/ui/match/issue-12552.stderr b/tests/ui/match/issue-12552.stderr
index 4b027eba2..195192fbd 100644
--- a/tests/ui/match/issue-12552.stderr
+++ b/tests/ui/match/issue-12552.stderr
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
LL | match t {
| - this expression has type `Result<_, {integer}>`
LL | Some(k) => match k {
- | ^^^^^^^ expected enum `Result`, found enum `Option`
+ | ^^^^^^^ expected `Result<_, {integer}>`, found `Option<_>`
|
= note: expected enum `Result<_, {integer}>`
found enum `Option<_>`
@@ -20,7 +20,7 @@ LL | match t {
| - this expression has type `Result<_, {integer}>`
...
LL | None => ()
- | ^^^^ expected enum `Result`, found enum `Option`
+ | ^^^^ expected `Result<_, {integer}>`, found `Option<_>`
|
= note: expected enum `Result<_, {integer}>`
found enum `Option<_>`
diff --git a/tests/ui/match/issue-74050-end-span.stderr b/tests/ui/match/issue-74050-end-span.stderr
index 59c091e44..0b3425f2b 100644
--- a/tests/ui/match/issue-74050-end-span.stderr
+++ b/tests/ui/match/issue-74050-end-span.stderr
@@ -4,6 +4,7 @@ error[E0597]: `arg` does not live long enough
LL | let _arg = match args.next() {
| ---- borrow later stored here
LL | Some(arg) => {
+ | --- binding `arg` declared here
LL | match arg.to_str() {
| ^^^^^^^^^^^^ borrowed value does not live long enough
...
diff --git a/tests/ui/match/issue-91058.stderr b/tests/ui/match/issue-91058.stderr
index ec1d7e21f..12f37274b 100644
--- a/tests/ui/match/issue-91058.stderr
+++ b/tests/ui/match/issue-91058.stderr
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
LL | match array {
| ----- this expression has type `[S; 1]`
LL | [()] => {}
- | ^^ expected struct `S`, found `()`
+ | ^^ expected `S`, found `()`
error: aborting due to previous error
diff --git a/tests/ui/match/match-ref-mut-invariance.stderr b/tests/ui/match/match-ref-mut-invariance.stderr
index 3b7e53cd5..b353d3514 100644
--- a/tests/ui/match/match-ref-mut-invariance.stderr
+++ b/tests/ui/match/match-ref-mut-invariance.stderr
@@ -6,7 +6,7 @@ LL | impl<'b> S<'b> {
LL | fn bar<'a>(&'a mut self) -> &'a mut &'a i32 {
| -- lifetime `'a` defined here
LL | match self.0 { ref mut x => x }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
|
= help: consider adding the following bound: `'a: 'b`
= note: requirement occurs because of a mutable reference to `&i32`
diff --git a/tests/ui/match/match-ref-mut-let-invariance.stderr b/tests/ui/match/match-ref-mut-let-invariance.stderr
index f4d1cea67..bb0fcdb99 100644
--- a/tests/ui/match/match-ref-mut-let-invariance.stderr
+++ b/tests/ui/match/match-ref-mut-let-invariance.stderr
@@ -7,7 +7,7 @@ LL | fn bar<'a>(&'a mut self) -> &'a mut &'a i32 {
| -- lifetime `'a` defined here
LL | let ref mut x = self.0;
LL | x
- | ^ associated function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
+ | ^ method was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
|
= help: consider adding the following bound: `'a: 'b`
= note: requirement occurs because of a mutable reference to `&i32`
diff --git a/tests/ui/match/match-struct.rs b/tests/ui/match/match-struct.rs
index 7a54c54b9..4da7b436b 100644
--- a/tests/ui/match/match-struct.rs
+++ b/tests/ui/match/match-struct.rs
@@ -5,7 +5,7 @@ fn main() {
match (S { a: 1 }) {
E::C(_) => (),
//~^ ERROR mismatched types
- //~| expected struct `S`, found enum `E`
+ //~| expected `S`, found `E`
_ => ()
}
}
diff --git a/tests/ui/match/match-struct.stderr b/tests/ui/match/match-struct.stderr
index a475bd5e5..fdc6fd770 100644
--- a/tests/ui/match/match-struct.stderr
+++ b/tests/ui/match/match-struct.stderr
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
LL | match (S { a: 1 }) {
| ------------ this expression has type `S`
LL | E::C(_) => (),
- | ^^^^^^^ expected struct `S`, found enum `E`
+ | ^^^^^^^ expected `S`, found `E`
error: aborting due to previous error
diff --git a/tests/ui/match/match-tag-nullary.stderr b/tests/ui/match/match-tag-nullary.stderr
index a6add31d1..aac873c76 100644
--- a/tests/ui/match/match-tag-nullary.stderr
+++ b/tests/ui/match/match-tag-nullary.stderr
@@ -5,7 +5,7 @@ LL | enum B { B }
| - unit variant defined here
LL |
LL | fn main() { let x: A = A::A; match x { B::B => { } } }
- | - ^^^^ expected enum `A`, found enum `B`
+ | - ^^^^ expected `A`, found `B`
| |
| this expression has type `A`
diff --git a/tests/ui/match/match-tag-unary.stderr b/tests/ui/match/match-tag-unary.stderr
index 31f77bdff..25e8152d8 100644
--- a/tests/ui/match/match-tag-unary.stderr
+++ b/tests/ui/match/match-tag-unary.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
--> $DIR/match-tag-unary.rs:4:43
|
LL | fn main() { let x: A = A::A(0); match x { B::B(y) => { } } }
- | - ^^^^^^^ expected enum `A`, found enum `B`
+ | - ^^^^^^^ expected `A`, found `B`
| |
| this expression has type `A`