diff options
Diffstat (limited to 'vendor/syn/tests/debug/mod.rs')
-rw-r--r-- | vendor/syn/tests/debug/mod.rs | 18 |
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" }) + } +} |