diff options
| author | bors <bors@rust-lang.org> | 2023-05-25 06:02:11 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-05-25 06:02:11 +0000 |
| commit | 0b011b7b7e5d1a1737aa3337f01b79fd5f56cf04 (patch) | |
| tree | 687c1a746df87c74af8b0ae892e2cd6876c51e98 /tests | |
| parent | 776f22292fb5c2cc45f029d4b754662120732a6a (diff) | |
| parent | a9743e108a254809a7235460f9ba9e000776c507 (diff) | |
| download | rust-0b011b7b7e5d1a1737aa3337f01b79fd5f56cf04.tar.gz rust-0b011b7b7e5d1a1737aa3337f01b79fd5f56cf04.zip | |
Auto merge of #111933 - matthiaskrgr:rollup-m10k3ts, r=matthiaskrgr
Rollup of 4 pull requests
Successful merges:
- #95198 (Add slice::{split_,}{first,last}_chunk{,_mut})
- #109899 (Use apple-m1 as target CPU for aarch64-apple-darwin.)
- #111624 (Emit diagnostic for privately uninhabited uncovered witnesses.)
- #111875 (Don't leak the function that is called on drop)
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/never_type/exhaustive_patterns.stderr | 1 | ||||
| -rw-r--r-- | tests/ui/uninhabited/uninhabited-irrefutable.rs | 7 | ||||
| -rw-r--r-- | tests/ui/uninhabited/uninhabited-irrefutable.stderr | 4 |
3 files changed, 11 insertions, 1 deletions
diff --git a/tests/ui/never_type/exhaustive_patterns.stderr b/tests/ui/never_type/exhaustive_patterns.stderr index 5fed903eb70..f7bf8581582 100644 --- a/tests/ui/never_type/exhaustive_patterns.stderr +++ b/tests/ui/never_type/exhaustive_patterns.stderr @@ -14,6 +14,7 @@ LL | enum Either<A, B> { LL | A(A), LL | B(inner::Wrapper<B>), | - not covered + = note: pattern `Either::B(_)` is currently uninhabited, but this variant contains private fields which may become inhabited in the future = note: the matched value is of type `Either<(), !>` help: you might want to use `if let` to ignore the variant that isn't matched | diff --git a/tests/ui/uninhabited/uninhabited-irrefutable.rs b/tests/ui/uninhabited/uninhabited-irrefutable.rs index 4b001aca2d1..cfd60a8d903 100644 --- a/tests/ui/uninhabited/uninhabited-irrefutable.rs +++ b/tests/ui/uninhabited/uninhabited-irrefutable.rs @@ -16,7 +16,9 @@ struct NotSoSecretlyEmpty { } enum Foo { + //~^ NOTE `Foo` defined here A(foo::SecretlyEmpty), + //~^ NOTE not covered B(foo::NotSoSecretlyEmpty), C(NotSoSecretlyEmpty), D(u32, u32), @@ -27,4 +29,9 @@ fn main() { let Foo::D(_y, _z) = x; //~^ ERROR refutable pattern in local binding //~| `Foo::A(_)` not covered + //~| NOTE `let` bindings require an "irrefutable pattern" + //~| NOTE for more information + //~| NOTE pattern `Foo::A(_)` is currently uninhabited + //~| NOTE the matched value is of type `Foo` + //~| HELP you might want to use `let else` } diff --git a/tests/ui/uninhabited/uninhabited-irrefutable.stderr b/tests/ui/uninhabited/uninhabited-irrefutable.stderr index 8cafea555c1..daf75f51b5a 100644 --- a/tests/ui/uninhabited/uninhabited-irrefutable.stderr +++ b/tests/ui/uninhabited/uninhabited-irrefutable.stderr @@ -1,5 +1,5 @@ error[E0005]: refutable pattern in local binding - --> $DIR/uninhabited-irrefutable.rs:27:9 + --> $DIR/uninhabited-irrefutable.rs:29:9 | LL | let Foo::D(_y, _z) = x; | ^^^^^^^^^^^^^^ pattern `Foo::A(_)` not covered @@ -11,8 +11,10 @@ note: `Foo` defined here | LL | enum Foo { | ^^^ +LL | LL | A(foo::SecretlyEmpty), | - not covered + = note: pattern `Foo::A(_)` is currently uninhabited, but this variant contains private fields which may become inhabited in the future = note: the matched value is of type `Foo` help: you might want to use `let else` to handle the variant that isn't matched | |
