#![allow(unused_imports)] #![allow(unused_must_use)] // pretty-expanded FIXME #23616 #![feature(rustc_private)] extern crate serialize; use std::fmt; use serialize::{Encoder, Encodable}; use serialize::json; struct Foo { v: T, } impl Drop for Foo { fn drop(&mut self) { json::encode(&self.v); } } fn main() { let _ = Foo { v: 10 }; }