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 --- .../source/item-brace-style-always-next-line.rs | 64 ++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 src/tools/rustfmt/tests/source/item-brace-style-always-next-line.rs (limited to 'src/tools/rustfmt/tests/source/item-brace-style-always-next-line.rs') diff --git a/src/tools/rustfmt/tests/source/item-brace-style-always-next-line.rs b/src/tools/rustfmt/tests/source/item-brace-style-always-next-line.rs new file mode 100644 index 000000000..0fb640512 --- /dev/null +++ b/src/tools/rustfmt/tests/source/item-brace-style-always-next-line.rs @@ -0,0 +1,64 @@ +// rustfmt-brace_style: AlwaysNextLine + +mod M { + enum A { + A, + } + + struct B { + b: i32, + } + + // For empty enums and structs, the brace remains on the same line. + enum C {} + + struct D {} + + enum A where T: Copy { + A, + } + + struct B where T: Copy { + b: i32, + } + + // For empty enums and structs, the brace remains on the same line. + enum C where T: Copy {} + + struct D where T: Copy {} +} + + +fn function() +{ + +} + +trait Trait +{ + +} + +impl Trait for T +{ + +} + +trait Trait2 +where + T: Copy + Display + Write + Read + FromStr, {} + +trait Trait3 +where + T: Something + + SomethingElse + + Sync + + Send + + Display + + Debug + + Copy + + Hash + + Debug + + Display + + Write + + Read, {} -- cgit v1.2.3