]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/rustfmt/tests/source/item-brace-style-prefer-same-line.rs
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / rustfmt / tests / source / item-brace-style-prefer-same-line.rs
diff --git a/src/tools/rustfmt/tests/source/item-brace-style-prefer-same-line.rs b/src/tools/rustfmt/tests/source/item-brace-style-prefer-same-line.rs
new file mode 100644 (file)
index 0000000..dff89b8
--- /dev/null
@@ -0,0 +1,29 @@
+// rustfmt-brace_style: PreferSameLine
+
+mod M {
+    enum A
+    {
+        A,
+    }
+
+    struct B
+    {
+        b: i32,
+    }
+
+    enum C {}
+
+    struct D {}
+
+    enum A<T> where T: Copy {
+        A,
+    }
+
+    struct B<T> where T: Copy {
+        b: i32,
+    }
+
+    enum C<T> where T: Copy {}
+
+    struct D<T> where T: Copy {}
+}