]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/trait-coercion-generic-regions.rs
Replace all ~"" with "".to_owned()
[rust.git] / src / test / compile-fail / trait-coercion-generic-regions.rs
index 1ea18a7c75b4d1c8fdbed3f5584adc5350507f01..6ffee2ef22b2105f7e691e23d17966072d4b8171 100644 (file)
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[feature(managed_boxes)];
-
 struct Struct {
     person: &'static str
 }
@@ -25,8 +23,8 @@ fn f(&self, x: &'static str) {
 }
 
 fn main() {
-    let person = ~"Fred";
-    let person: &str = person;  //~ ERROR borrowed value does not live long enough
-    let s: @Trait<&'static str> = @Struct { person: person };
+    let person = "Fred".to_owned();
+    let person: &str = person;  //~ ERROR `person[..]` does not live long enough
+    let s: ~Trait<&'static str> = ~Struct { person: person };
 }