diff options
| author | bors <bors@rust-lang.org> | 2019-10-28 04:21:44 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-10-28 04:21:44 +0000 |
| commit | 9285d401a6070094747465962bc49969b93e14c5 (patch) | |
| tree | 6380d967e96679b26297a1c8a2adc7641f65551e /src/test/ui/pattern/usefulness/refutable-pattern-errors.rs | |
| parent | 95f437b3cfb2fec966d7eaf69d7c2e36f9c274d1 (diff) | |
| parent | 606743e8c70821d2aaaf4886d601f1bf96884ce2 (diff) | |
| download | rust-9285d401a6070094747465962bc49969b93e14c5.tar.gz rust-9285d401a6070094747465962bc49969b93e14c5.zip | |
Auto merge of #65885 - Centril:rollup-y6b2qbf, r=Centril
Rollup of 6 pull requests Successful merges: - #64747 (Stabilize `Option::flatten`) - #65664 (`std::panic::Location` is a lang_item, add `core::intrinsics::caller_location` (RFC 2091 3/N)) - #65792 (rustc, rustc_passes: reduce deps on rustc_expand) - #65849 (librustc_lexer: Enhance documentation) - #65873 (doc: explain why it is unsafe to construct Vec<u8> from Vec<u16>) - #65880 (Gather together usefulness tests) Failed merges: r? @ghost
Diffstat (limited to 'src/test/ui/pattern/usefulness/refutable-pattern-errors.rs')
| -rw-r--r-- | src/test/ui/pattern/usefulness/refutable-pattern-errors.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/pattern/usefulness/refutable-pattern-errors.rs b/src/test/ui/pattern/usefulness/refutable-pattern-errors.rs new file mode 100644 index 00000000000..d4afe17ca74 --- /dev/null +++ b/src/test/ui/pattern/usefulness/refutable-pattern-errors.rs @@ -0,0 +1,9 @@ +// ignore-tidy-linelength + +fn func((1, (Some(1), 2..=3)): (isize, (Option<isize>, isize))) { } +//~^ ERROR refutable pattern in function argument: `(_, _)` not covered + +fn main() { + let (1, (Some(1), 2..=3)) = (1, (None, 2)); + //~^ ERROR refutable pattern in local binding: `(std::i32::MIN..=0i32, _)` and `(2i32..=std::i32::MAX, _)` not covered +} |
