summaryrefslogtreecommitdiffstats
path: root/tests/ui/privacy/suggest-box-new.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/privacy/suggest-box-new.rs')
-rw-r--r--tests/ui/privacy/suggest-box-new.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/privacy/suggest-box-new.rs b/tests/ui/privacy/suggest-box-new.rs
new file mode 100644
index 000000000..2e18dba8b
--- /dev/null
+++ b/tests/ui/privacy/suggest-box-new.rs
@@ -0,0 +1,15 @@
+// run-rustfix
+#![allow(dead_code)]
+struct U <T> {
+ wtf: Option<Box<U<T>>>,
+ x: T,
+}
+fn main() {
+ U {
+ wtf: Some(Box(U { //~ ERROR cannot initialize a tuple struct which contains private fields
+ wtf: None,
+ x: (),
+ })),
+ x: ()
+ };
+}