about summary refs log tree commit diff
path: root/src/test/ui/refutable-pattern-errors.stderr
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-10-13 11:36:52 +0000
committerbors <bors@rust-lang.org>2019-10-13 11:36:52 +0000
commitaa2ae564d391a3da10bca2a79ab529a9925fbe58 (patch)
treec2cd4ba7039146bc964171693b6978296f585a72 /src/test/ui/refutable-pattern-errors.stderr
parent29b6e0f0a1d1a37f8dc729484a64e59bf0b9a0a3 (diff)
parentb82859171cda6380546ad4802015dd803e4847a0 (diff)
downloadrust-aa2ae564d391a3da10bca2a79ab529a9925fbe58.tar.gz
rust-aa2ae564d391a3da10bca2a79ab529a9925fbe58.zip
Auto merge of #65368 - Centril:rollup-lb7fe48, r=Centril
Rollup of 13 pull requests

Successful merges:

 - #65039 (Document missing deny by default lints)
 - #65069 (Implement Clone::clone_from for VecDeque)
 - #65165 (Improve docs on some char boolean methods)
 - #65248 (Suggest `if let` on `let` refutable binding)
 - #65250 (resolve: fix error title regarding private constructors)
 - #65295 (Move diagnostics code out of the critical path)
 - #65320 (Report `CONST_ERR` lint in external macros)
 - #65327 (replace the hand-written binary search with the library one)
 - #65339 (do not reference LLVM for our concurrency memory model)
 - #65357 (syntax: simplify maybe_annotate_with_ascription)
 - #65358 (simplify maybe_stage_features)
 - #65359 (simplify integer_lit)
 - #65360 (mbe: reduce panictry! uses.)

Failed merges:

r? @ghost
Diffstat (limited to 'src/test/ui/refutable-pattern-errors.stderr')
-rw-r--r--src/test/ui/refutable-pattern-errors.stderr7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/ui/refutable-pattern-errors.stderr b/src/test/ui/refutable-pattern-errors.stderr
index 3b13e25293d..0cf5d9cd5f1 100644
--- a/src/test/ui/refutable-pattern-errors.stderr
+++ b/src/test/ui/refutable-pattern-errors.stderr
@@ -9,6 +9,13 @@ error[E0005]: refutable pattern in local binding: `(std::i32::MIN..=0i32, _)` an
    |
 LL |     let (1, (Some(1), 2..=3)) = (1, (None, 2));
    |         ^^^^^^^^^^^^^^^^^^^^^ patterns `(std::i32::MIN..=0i32, _)` and `(2i32..=std::i32::MAX, _)` not covered
+   |
+   = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
+   = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
+help: you might want to use `if let` to ignore the variant that isn't matched
+   |
+LL |     if let (1, (Some(1), 2..=3)) = (1, (None, 2)) { /* */ }
+   |
 
 error: aborting due to 2 previous errors