Add tests for #2511

This commit is contained in:
Seiichi Uchida 2018-03-06 19:42:38 +09:00
parent 61919022dd
commit 3fc8bb19a6
2 changed files with 65 additions and 0 deletions

View File

@ -0,0 +1,27 @@
#![feature(if_while_or_patterns)]
fn main() {
if let 0 | 1 = 0 {
println!("hello, world");
};
if let aaaaaaaaaaaaaaaaaaaaaaaaaa | bbbbbbbbbbbbbbbbbbbbbbbbbbb | cccccccccccccccc | d_100 = 0 {
println!("hello, world");
}
if let aaaaaaaaaaaaaaaaaaaaaaaaaa | bbbbbbbbbbbbbbbbbbbbbbb | ccccccccccccccccccccc | d_101 = 0 {
println!("hello, world");
}
if let aaaaaaaaaaaaaaaaaaaaaaaaaaaa | bbbbbbbbbbbbbbbbbbbbbbb | ccccccccccccccccccccc | d_103 = 0 {
println!("hello, world");
}
if let aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | bbbbbbbbbbbbbbbbbbbbbbb | ccccccccccccccccccccc | d_105 = 0 {
println!("hello, world");
}
while let xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx = foo_bar(bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb, cccccccccccccccccccccccccccccccccccccccc) {
println!("hello, world");
}
}

View File

@ -0,0 +1,38 @@
#![feature(if_while_or_patterns)]
fn main() {
if let 0 | 1 = 0 {
println!("hello, world");
};
if let aaaaaaaaaaaaaaaaaaaaaaaaaa | bbbbbbbbbbbbbbbbbbbbbbbbbbb | cccccccccccccccc | d_100 = 0 {
println!("hello, world");
}
if let aaaaaaaaaaaaaaaaaaaaaaaaaa | bbbbbbbbbbbbbbbbbbbbbbb | ccccccccccccccccccccc | d_101 = 0
{
println!("hello, world");
}
if let aaaaaaaaaaaaaaaaaaaaaaaaaaaa | bbbbbbbbbbbbbbbbbbbbbbb | ccccccccccccccccccccc | d_103 =
0
{
println!("hello, world");
}
if let aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
| bbbbbbbbbbbbbbbbbbbbbbb
| ccccccccccccccccccccc
| d_105 = 0
{
println!("hello, world");
}
while let xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx
| xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx = foo_bar(
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb,
cccccccccccccccccccccccccccccccccccccccc,
) {
println!("hello, world");
}
}