summaryrefslogtreecommitdiffstats
path: root/tests/ui/rfc-2008-non-exhaustive/struct.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:29 +0000
commit631cd5845e8de329d0e227aaa707d7ea228b8f8f (patch)
treea1b87c8f8cad01cf18f7c5f57a08f102771ed303 /tests/ui/rfc-2008-non-exhaustive/struct.stderr
parentAdding debian version 1.69.0+dfsg1-1. (diff)
downloadrustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.tar.xz
rustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.zip
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/rfc-2008-non-exhaustive/struct.stderr')
-rw-r--r--tests/ui/rfc-2008-non-exhaustive/struct.stderr9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/ui/rfc-2008-non-exhaustive/struct.stderr b/tests/ui/rfc-2008-non-exhaustive/struct.stderr
index 2cb9ba0d1..39b1ef1e0 100644
--- a/tests/ui/rfc-2008-non-exhaustive/struct.stderr
+++ b/tests/ui/rfc-2008-non-exhaustive/struct.stderr
@@ -10,14 +10,11 @@ error[E0603]: tuple struct constructor `TupleStruct` is private
LL | let ts_explicit = structs::TupleStruct(640, 480);
| ^^^^^^^^^^^ private tuple struct constructor
|
- ::: $DIR/auxiliary/structs.rs:12:24
- |
-LL | pub struct TupleStruct(pub u16, pub u16);
- | ---------------- a constructor is private if any of the fields is private
- |
note: the tuple struct constructor `TupleStruct` is defined here
--> $DIR/auxiliary/structs.rs:12:1
|
+LL | #[non_exhaustive]
+ | ----------------- cannot be constructed because it is `#[non_exhaustive]`
LL | pub struct TupleStruct(pub u16, pub u16);
| ^^^^^^^^^^^^^^^^^^^^^^
@@ -30,6 +27,8 @@ LL | let us_explicit = structs::UnitStruct;
note: the unit struct `UnitStruct` is defined here
--> $DIR/auxiliary/structs.rs:9:1
|
+LL | #[non_exhaustive]
+ | ----------------- cannot be constructed because it is `#[non_exhaustive]`
LL | pub struct UnitStruct;
| ^^^^^^^^^^^^^^^^^^^^^