summaryrefslogtreecommitdiffstats
path: root/vendor/syn/tests/debug/mod.rs
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 /vendor/syn/tests/debug/mod.rs
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 'vendor/syn/tests/debug/mod.rs')
-rw-r--r--vendor/syn/tests/debug/mod.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/vendor/syn/tests/debug/mod.rs b/vendor/syn/tests/debug/mod.rs
index 0a0991a92..caf9eed80 100644
--- a/vendor/syn/tests/debug/mod.rs
+++ b/vendor/syn/tests/debug/mod.rs
@@ -123,3 +123,21 @@ where
.finish()
}
}
+
+struct Present;
+
+impl Debug for Present {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ formatter.write_str("Some")
+ }
+}
+
+struct Option {
+ present: bool,
+}
+
+impl Debug for Option {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ formatter.write_str(if self.present { "Some" } else { "None" })
+ }
+}