2 struct Wrapper(String);
5 pub fn new(wrapped: String) -> Wrapper {
10 let Wrapper(ref s) = *self;
11 println!("hello {}", *s);
15 impl Drop for Wrapper {
21 // This runs without complaint.
22 let x = Wrapper::new("Bob".to_string());
26 // This fails to compile, circa 0.8-89-gc635fba.
27 // error: internal compiler error: drop_ty_immediate: non-box ty
28 Wrapper::new("Bob".to_string()).say_hi();