summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-76077.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/issues/issue-76077.rs')
-rw-r--r--src/test/ui/issues/issue-76077.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-76077.rs b/src/test/ui/issues/issue-76077.rs
new file mode 100644
index 000000000..2d29093b0
--- /dev/null
+++ b/src/test/ui/issues/issue-76077.rs
@@ -0,0 +1,10 @@
+pub mod foo {
+ pub struct Foo {
+ you_cant_use_this_field: bool,
+ }
+}
+
+fn main() {
+ foo::Foo {};
+ //~^ ERROR cannot construct `Foo` with struct literal syntax due to private fields
+}