summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/target/anonymous-types.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/rustfmt/tests/target/anonymous-types.rs')
-rw-r--r--src/tools/rustfmt/tests/target/anonymous-types.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/target/anonymous-types.rs b/src/tools/rustfmt/tests/target/anonymous-types.rs
new file mode 100644
index 000000000..8e08c314e
--- /dev/null
+++ b/src/tools/rustfmt/tests/target/anonymous-types.rs
@@ -0,0 +1,19 @@
+// 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,
+}
+
+fn main() {}