diff options
| author | Nadrieril <nadrieril+git@gmail.com> | 2024-08-19 20:51:21 +0200 |
|---|---|---|
| committer | Nadrieril <nadrieril+git@gmail.com> | 2024-08-19 21:39:57 +0200 |
| commit | 25964b541e5671de044fd01d058a45bb92b75d1e (patch) | |
| tree | 51ba5b76e37b29ea924784fdebe429d24de0ce1e /tests/ui/rfcs | |
| parent | 0f442e265c165c0a78633bef98de18517815150c (diff) | |
| download | rust-25964b541e5671de044fd01d058a45bb92b75d1e.tar.gz rust-25964b541e5671de044fd01d058a45bb92b75d1e.zip | |
Reword the "unreachable pattern" explanations
Diffstat (limited to 'tests/ui/rfcs')
5 files changed, 16 insertions, 16 deletions
diff --git a/tests/ui/rfcs/rfc-0000-never_patterns/unreachable.stderr b/tests/ui/rfcs/rfc-0000-never_patterns/unreachable.stderr index 79b640d9f41..be8b38f6942 100644 --- a/tests/ui/rfcs/rfc-0000-never_patterns/unreachable.stderr +++ b/tests/ui/rfcs/rfc-0000-never_patterns/unreachable.stderr @@ -4,7 +4,7 @@ error: unreachable pattern LL | Err(!), | ^^^^^^ | - = note: this pattern matches no values because `Void` is uninhabited + = note: matches no values because `Void` is uninhabited note: the lint level is defined here --> $DIR/unreachable.rs:4:9 | @@ -17,7 +17,7 @@ error: unreachable pattern LL | let (Ok(_x) | Err(!)) = res_void; | ^^^^^^ | - = note: this pattern matches no values because `Void` is uninhabited + = note: matches no values because `Void` is uninhabited error: unreachable pattern --> $DIR/unreachable.rs:19:12 @@ -25,7 +25,7 @@ error: unreachable pattern LL | if let Err(!) = res_void {} | ^^^^^^ | - = note: this pattern matches no values because `Void` is uninhabited + = note: matches no values because `Void` is uninhabited error: unreachable pattern --> $DIR/unreachable.rs:21:24 @@ -33,7 +33,7 @@ error: unreachable pattern LL | if let (Ok(true) | Err(!)) = res_void {} | ^^^^^^ | - = note: this pattern matches no values because `Void` is uninhabited + = note: matches no values because `Void` is uninhabited error: unreachable pattern --> $DIR/unreachable.rs:23:23 @@ -41,7 +41,7 @@ error: unreachable pattern LL | for (Ok(mut _x) | Err(!)) in [res_void] {} | ^^^^^^ | - = note: this pattern matches no values because `Void` is uninhabited + = note: matches no values because `Void` is uninhabited error: unreachable pattern --> $DIR/unreachable.rs:27:18 @@ -49,7 +49,7 @@ error: unreachable pattern LL | fn foo((Ok(_x) | Err(!)): Result<bool, Void>) {} | ^^^^^^ | - = note: this pattern matches no values because `Void` is uninhabited + = note: matches no values because `Void` is uninhabited error: aborting due to 6 previous errors diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/enum_same_crate_empty_match.stderr b/tests/ui/rfcs/rfc-2008-non-exhaustive/enum_same_crate_empty_match.stderr index d5f58e436c5..06bc901ffdf 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/enum_same_crate_empty_match.stderr +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/enum_same_crate_empty_match.stderr @@ -4,7 +4,7 @@ error: unreachable pattern LL | _ => {} | ^ | - = note: this pattern matches no values because `EmptyNonExhaustiveEnum` is uninhabited + = note: matches no values because `EmptyNonExhaustiveEnum` is uninhabited note: the lint level is defined here --> $DIR/enum_same_crate_empty_match.rs:1:9 | diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/issue-65157-repeated-match-arm.stderr b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/issue-65157-repeated-match-arm.stderr index 4ec4ec9705a..956725fc10e 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/issue-65157-repeated-match-arm.stderr +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/issue-65157-repeated-match-arm.stderr @@ -2,9 +2,9 @@ error: unreachable pattern --> $DIR/issue-65157-repeated-match-arm.rs:15:9 | LL | PartiallyInhabitedVariants::Struct { .. } => {}, - | ----------------------------------------- matches all the values already + | ----------------------------------------- matches all the relevant values LL | PartiallyInhabitedVariants::Struct { .. } => {}, - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable pattern + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no value can reach this | note: the lint level is defined here --> $DIR/issue-65157-repeated-match-arm.rs:2:9 diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/patterns_same_crate.stderr b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/patterns_same_crate.stderr index c399bb9083f..982129046b8 100644 --- a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/patterns_same_crate.stderr +++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/patterns_same_crate.stderr @@ -4,7 +4,7 @@ error: unreachable pattern LL | Some(_x) => (), | ^^^^^^^^ | - = note: this pattern matches no values because `UninhabitedEnum` is uninhabited + = note: matches no values because `UninhabitedEnum` is uninhabited note: the lint level is defined here --> $DIR/patterns_same_crate.rs:1:9 | @@ -17,7 +17,7 @@ error: unreachable pattern LL | Some(_x) => (), | ^^^^^^^^ | - = note: this pattern matches no values because `UninhabitedVariants` is uninhabited + = note: matches no values because `UninhabitedVariants` is uninhabited error: unreachable pattern --> $DIR/patterns_same_crate.rs:60:15 @@ -25,7 +25,7 @@ error: unreachable pattern LL | while let PartiallyInhabitedVariants::Struct { x } = partially_inhabited_variant() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: this pattern matches no values because `!` is uninhabited + = note: matches no values because `!` is uninhabited error: unreachable pattern --> $DIR/patterns_same_crate.rs:64:15 @@ -33,7 +33,7 @@ error: unreachable pattern LL | while let Some(_x) = uninhabited_struct() { | ^^^^^^^^ | - = note: this pattern matches no values because `UninhabitedStruct` is uninhabited + = note: matches no values because `UninhabitedStruct` is uninhabited error: unreachable pattern --> $DIR/patterns_same_crate.rs:67:15 @@ -41,7 +41,7 @@ error: unreachable pattern LL | while let Some(_x) = uninhabited_tuple_struct() { | ^^^^^^^^ | - = note: this pattern matches no values because `UninhabitedTupleStruct` is uninhabited + = note: matches no values because `UninhabitedTupleStruct` is uninhabited error: aborting due to 5 previous errors diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/warns.stderr b/tests/ui/rfcs/rfc-2294-if-let-guard/warns.stderr index 8d0874fa900..693a06a2297 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/warns.stderr +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/warns.stderr @@ -16,9 +16,9 @@ error: unreachable pattern --> $DIR/warns.rs:15:25 | LL | x if let None | None = x => {} - | ---- ^^^^ unreachable pattern + | ---- ^^^^ no value can reach this | | - | matches all the values already + | matches all the relevant values | note: the lint level is defined here --> $DIR/warns.rs:12:8 |
