]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/issue-9259.rs
cleanup: s/impl Copy/#[derive(Copy)]/g
[rust.git] / src / test / run-pass / issue-9259.rs
index b03213272cb16cbc73c826306e0504e761711783..0fe520e59d622050bec7e282a3248b9d4f6795e7 100644 (file)
@@ -9,15 +9,15 @@
 // except according to those terms.
 
 struct A<'a> {
-    a: &'a [~str],
-    b: Option<&'a [~str]>,
+    a: &'a [String],
+    b: Option<&'a [String]>,
 }
 
 pub fn main() {
-    let b = &["foo".to_owned()];
+    let b: &[String] = &["foo".to_string()];
     let a = A {
-        a: &["test".to_owned()],
+        a: &["test".to_string()],
         b: Some(b),
     };
-    assert_eq!(a.b.get_ref()[0].as_slice(), "foo");
+    assert_eq!(a.b.as_ref().unwrap()[0].as_slice(), "foo");
 }