2020-09-01 22:53:04 +00:00
|
|
|
// Regression test for diagnostic issue #76191
|
|
|
|
#![allow(non_snake_case)]
|
|
|
|
|
|
|
|
use std::ops::RangeInclusive;
|
2020-09-15 16:56:17 +00:00
|
|
|
|
2020-09-01 22:53:04 +00:00
|
|
|
const RANGE: RangeInclusive<i32> = 0..=255;
|
|
|
|
|
2020-09-15 16:56:17 +00:00
|
|
|
const RANGE2: RangeInclusive<i32> = panic!();
|
2024-02-14 12:28:07 +00:00
|
|
|
//~^ ERROR evaluation of constant value failed
|
2020-09-15 16:56:17 +00:00
|
|
|
|
2020-09-01 22:53:04 +00:00
|
|
|
fn main() {
|
|
|
|
let n: i32 = 1;
|
|
|
|
match n {
|
|
|
|
RANGE => {}
|
|
|
|
//~^ ERROR mismatched types
|
2020-09-15 16:56:17 +00:00
|
|
|
RANGE2 => {}
|
|
|
|
//~^ ERROR mismatched types
|
2020-09-01 22:53:04 +00:00
|
|
|
_ => {}
|
|
|
|
}
|
|
|
|
}
|