diff options
Diffstat (limited to 'src/test/ui/union/union-trait-impl.rs')
-rw-r--r-- | src/test/ui/union/union-trait-impl.rs | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/test/ui/union/union-trait-impl.rs b/src/test/ui/union/union-trait-impl.rs deleted file mode 100644 index 6134e91f3..000000000 --- a/src/test/ui/union/union-trait-impl.rs +++ /dev/null @@ -1,19 +0,0 @@ -// run-pass -// revisions: mirunsafeck thirunsafeck -// [thirunsafeck]compile-flags: -Z thir-unsafeck - -use std::fmt; - -union U { - a: u8 -} - -impl fmt::Display for U { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - unsafe { write!(f, "Oh hai {}", self.a) } - } -} - -fn main() { - assert_eq!(U { a: 2 }.to_string(), "Oh hai 2"); -} |