2020-09-01 17:53:04 -05:00
|
|
|
// Regression test for diagnostic issue #76191
|
|
|
|
#![allow(non_snake_case)]
|
|
|
|
|
|
|
|
use std::ops::RangeInclusive;
|
2020-09-15 11:56:17 -05:00
|
|
|
|
2020-09-01 17:53:04 -05:00
|
|
|
const RANGE: RangeInclusive<i32> = 0..=255;
|
|
|
|
|
2020-09-15 11:56:17 -05:00
|
|
|
const RANGE2: RangeInclusive<i32> = panic!();
|
|
|
|
|
2020-09-01 17:53:04 -05:00
|
|
|
fn main() {
|
|
|
|
let n: i32 = 1;
|
|
|
|
match n {
|
|
|
|
RANGE => {}
|
|
|
|
//~^ ERROR mismatched types
|
2020-09-15 11:56:17 -05:00
|
|
|
RANGE2 => {}
|
|
|
|
//~^ ERROR mismatched types
|
2020-09-01 17:53:04 -05:00
|
|
|
_ => {}
|
|
|
|
}
|
|
|
|
}
|