From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- .../rustfmt/tests/source/if_while_or_patterns.rs | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/tools/rustfmt/tests/source/if_while_or_patterns.rs (limited to 'src/tools/rustfmt/tests/source/if_while_or_patterns.rs') diff --git a/src/tools/rustfmt/tests/source/if_while_or_patterns.rs b/src/tools/rustfmt/tests/source/if_while_or_patterns.rs new file mode 100644 index 000000000..f01df7e91 --- /dev/null +++ b/src/tools/rustfmt/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"); + } +} -- cgit v1.2.3