about summary refs log tree commit diff
path: root/tests/ui/suggestions/multi-suggestion.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/suggestions/multi-suggestion.rs')
-rw-r--r--tests/ui/suggestions/multi-suggestion.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/ui/suggestions/multi-suggestion.rs b/tests/ui/suggestions/multi-suggestion.rs
new file mode 100644
index 00000000000..99d2407aa21
--- /dev/null
+++ b/tests/ui/suggestions/multi-suggestion.rs
@@ -0,0 +1,22 @@
+//@ revisions: ascii unicode
+//@[unicode] compile-flags: -Zunstable-options --error-format=human-unicode
+
+#![allow(dead_code)]
+struct U <T> {
+    wtf: Option<Box<U<T>>>,
+    x: T,
+}
+fn main() {
+    U {
+        wtf: Some(Box(U { //[ascii]~ ERROR cannot initialize a tuple struct which contains private fields
+            wtf: None,
+            x: (),
+        })),
+        x: ()
+    };
+    let _ = std::collections::HashMap();
+    //[ascii]~^ ERROR expected function, tuple struct or tuple variant, found struct `std::collections::HashMap`
+    let _ = std::collections::HashMap {};
+    //[ascii]~^ ERROR cannot construct `HashMap<_, _, _>` with struct literal syntax due to private fields
+    let _ = Box {}; //[ascii]~ ERROR cannot construct `Box<_, _>` with struct literal syntax due to private fields
+}