Rollup merge of #64007 - estebank:overlapping-patterns, r=matthewjasper

Add check for overlapping ranges to unreachable patterns lint

Fix #63987.
This commit is contained in:
Mazdak Farrokhzad 2019-10-19 16:00:50 +02:00 committed by GitHub
commit 53a3bfc82b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 317 additions and 115 deletions

View file

@ -2,7 +2,6 @@
// Test that codegen works correctly when there are multiple refutable
// patterns in match expression.
enum Foo {
FooUint(usize),
FooNullary,

View file

@ -1,5 +1,5 @@
// run-pass
#![allow(unused_imports)]
#![allow(unused_imports, overlapping_patterns)]
// pretty-expanded FIXME #23616
use m::{START, END};

View file

@ -1,4 +1,6 @@
// run-pass
#![allow(overlapping_patterns)]
fn main() {
let x = 'a';