diff --git a/tests/source/if_while_or_patterns.rs b/tests/source/if_while_or_patterns.rs new file mode 100644 index 00000000000..f01df7e9158 --- /dev/null +++ b/tests/source/if_while_or_patterns.rs @@ -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"); + } +} diff --git a/tests/target/if_while_or_patterns.rs b/tests/target/if_while_or_patterns.rs new file mode 100644 index 00000000000..61a357afcba --- /dev/null +++ b/tests/target/if_while_or_patterns.rs @@ -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"); + } +}