mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-19 11:12:43 +00:00
Add tests for #2511
This commit is contained in:
parent
61919022dd
commit
3fc8bb19a6
27
tests/source/if_while_or_patterns.rs
Normal file
27
tests/source/if_while_or_patterns.rs
Normal 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");
|
||||
}
|
||||
}
|
38
tests/target/if_while_or_patterns.rs
Normal file
38
tests/target/if_while_or_patterns.rs
Normal 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");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user