diff options
| author | Nadrieril <nadrieril+git@gmail.com> | 2024-07-27 11:08:16 +0200 |
|---|---|---|
| committer | Nadrieril <nadrieril+git@gmail.com> | 2024-08-10 12:07:17 +0200 |
| commit | 99468bb7609ad5f598ef105860ceb32bc1b95074 (patch) | |
| tree | 9f0c30d79468e26d2ef8a34ce869ff98883ace55 /tests/ui/pattern/usefulness/empty-match-check-notes.rs | |
| parent | cd40769c02e31649bae3422ec7215783bc9d416f (diff) | |
| download | rust-99468bb7609ad5f598ef105860ceb32bc1b95074.tar.gz rust-99468bb7609ad5f598ef105860ceb32bc1b95074.zip | |
Update tests
Diffstat (limited to 'tests/ui/pattern/usefulness/empty-match-check-notes.rs')
| -rw-r--r-- | tests/ui/pattern/usefulness/empty-match-check-notes.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/ui/pattern/usefulness/empty-match-check-notes.rs b/tests/ui/pattern/usefulness/empty-match-check-notes.rs index 2eef283a21e..61a75e6c801 100644 --- a/tests/ui/pattern/usefulness/empty-match-check-notes.rs +++ b/tests/ui/pattern/usefulness/empty-match-check-notes.rs @@ -35,14 +35,14 @@ fn empty_foreign_enum(x: empty::EmptyForeignEnum) { } } -fn empty_foreign_enum_private(x: Option<empty::SecretlyUninhabitedForeignStruct>) { - let None = x; +fn empty_foreign_enum_private(x: &Option<empty::SecretlyUninhabitedForeignStruct>) { + let None = *x; //~^ ERROR refutable pattern in local binding //~| NOTE `let` bindings require an "irrefutable pattern" //~| NOTE for more information, visit //~| NOTE the matched value is of type //~| NOTE pattern `Some(_)` not covered - //[exhaustive_patterns]~| NOTE currently uninhabited, but this variant contains private fields + //~| NOTE currently uninhabited, but this variant contains private fields } fn main() { |
