2 // revisions: mirunsafeck thirunsafeck
3 // [thirunsafeck]compile-flags: -Z thir-unsafeck
11 impl fmt::Display for U {
12 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
13 unsafe { write!(f, "Oh hai {}", self.a) }
18 assert_eq!(U { a: 2 }.to_string(), "Oh hai 2");