diff options
Diffstat (limited to 'vendor/derive_builder/tests/run-pass/custom_types.rs')
-rw-r--r-- | vendor/derive_builder/tests/run-pass/custom_types.rs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/vendor/derive_builder/tests/run-pass/custom_types.rs b/vendor/derive_builder/tests/run-pass/custom_types.rs new file mode 100644 index 000000000..2b4f999e2 --- /dev/null +++ b/vendor/derive_builder/tests/run-pass/custom_types.rs @@ -0,0 +1,30 @@ +#![allow(dead_code)] + +#[macro_use] +extern crate derive_builder; + +struct Unit; + +type Clone = Unit; +type Into = Unit; +type Option = Unit; +type Result = Unit; +type Some = Unit; +type String = Unit; + +impl core::fmt::Debug for Unit { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + write!(f, "()") + } +} + +impl core::fmt::Display for Unit { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + write!(f, "()") + } +} + +#[derive(Builder)] +struct IgnoreEmptyStruct {} + +fn main() { } |