diff options
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() { | 
