From 16250ea7ba73f858a6ee08374848fbea615ea6c3 Mon Sep 17 00:00:00 2001 From: Frank King Date: Sat, 6 Jan 2024 15:52:22 +0800 Subject: [PATCH] Add rustfmt test from #117942 --- tests/target/anonymous-types.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/target/anonymous-types.rs b/tests/target/anonymous-types.rs index 8e08c314ed1..e8c2d83878c 100644 --- a/tests/target/anonymous-types.rs +++ b/tests/target/anonymous-types.rs @@ -16,4 +16,16 @@ struct Foo { e: f32, } +// Test for https://github.com/rust-lang/rust/issues/117942 +struct Foo { + _: union { + #[rustfmt::skip] + f: String, + }, + #[rustfmt::skip] + _: struct { + g: i32, + }, +} + fn main() {}