summaryrefslogtreecommitdiffstats
path: root/tests/ui/privacy/issue-75907.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/ui/privacy/issue-75907.stderr
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/privacy/issue-75907.stderr')
-rw-r--r--tests/ui/privacy/issue-75907.stderr37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/ui/privacy/issue-75907.stderr b/tests/ui/privacy/issue-75907.stderr
new file mode 100644
index 000000000..f7cb874c2
--- /dev/null
+++ b/tests/ui/privacy/issue-75907.stderr
@@ -0,0 +1,37 @@
+error[E0532]: cannot match against a tuple struct which contains private fields
+ --> $DIR/issue-75907.rs:15:9
+ |
+LL | let Bar(x, y, Foo(z)) = make_bar();
+ | ^^^
+ |
+note: constructor is not visible here due to private fields
+ --> $DIR/issue-75907.rs:15:16
+ |
+LL | let Bar(x, y, Foo(z)) = make_bar();
+ | ^ ^^^^^^ private field
+ | |
+ | private field
+help: consider making the fields publicly accessible
+ |
+LL | pub(crate) struct Bar(pub u8, pub u8, pub Foo);
+ | ~~~ ~~~ +++
+
+error[E0532]: cannot match against a tuple struct which contains private fields
+ --> $DIR/issue-75907.rs:15:19
+ |
+LL | let Bar(x, y, Foo(z)) = make_bar();
+ | ^^^
+ |
+note: constructor is not visible here due to private fields
+ --> $DIR/issue-75907.rs:15:23
+ |
+LL | let Bar(x, y, Foo(z)) = make_bar();
+ | ^ private field
+help: consider making the field publicly accessible
+ |
+LL | pub(crate) struct Foo(pub u8);
+ | +++
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0532`.