rust/tests/ui/parser/issues/issue-63115-range-pat-interpolated.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
455 B
Rust
Raw Normal View History

// check-pass
#![feature(exclusive_range_pattern)]
#![allow(ellipsis_inclusive_range_patterns)]
fn main() {
macro_rules! mac_expr {
($e:expr) => {
if let 2...$e = 3 {}
if let 2..=$e = 3 {}
if let 2..$e = 3 {}
if let ..$e = 3 {}
if let ..=$e = 3 {}
if let $e.. = 5 {}
if let $e..5 = 4 {}
if let $e..=5 = 4 {}
}
}
mac_expr!(4);
}