// option. This file may not be copied, modified, or distributed
// except according to those terms.
+
struct Struct {
person: &'static str
}
}
fn main() {
- let s: ~Trait<int> = ~Struct { person: "Fred" }; //~ ERROR expected Trait<int>, but found Trait<&'static str>
- //~^ ERROR expected Trait<int>, but found Trait<&'static str>
+ let s: Box<Trait<int>> = box Struct { person: "Fred" };
+ //~^ ERROR type mismatch
s.f(1);
}
-