From d59b1f1ef4be692b67c1ff1b49ec810fd59452cf Mon Sep 17 00:00:00 2001 From: jedel1043 Date: Fri, 21 May 2021 11:45:55 -0500 Subject: [PATCH] Add test for pretty printing anonymous types --- src/test/pretty/anonymous-types.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/test/pretty/anonymous-types.rs diff --git a/src/test/pretty/anonymous-types.rs b/src/test/pretty/anonymous-types.rs new file mode 100644 index 0000000000000..5ff452e8e43c4 --- /dev/null +++ b/src/test/pretty/anonymous-types.rs @@ -0,0 +1,24 @@ +// Test for issue 85480 +// Pretty print anonymous struct and union types + +// pp-exact +// pretty-compare-only + +struct Foo { + _: union { + _: struct { + a: u8, + b: u16, + }, + c: u32, + }, + d: u64, + e: f32, +} + +type A = + struct { + field: u8, + }; + +fn main() { }