-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
F-exclusive_range_pattern`#![feature(exclusive_range_pattern)]``#![feature(exclusive_range_pattern)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
#![feature(exclusive_range_pattern)]
fn main() {
let a: u8 = 11;
match a {
1..11 => println!("1 to 10"),
11 => println!("11"), // warning: unreachable pattern
_ => println!("else"),
};
}
With rust nightly compiler, the result on the screen is 11
even though the compiler warning that 11 case is unreachable.
Link to rust playground: https://play.rust-lang.org/?gist=a3c8f0a3cfa3209a52992aedf9220720&version=nightly
Metadata
Metadata
Assignees
Labels
F-exclusive_range_pattern`#![feature(exclusive_range_pattern)]``#![feature(exclusive_range_pattern)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.