]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/borrow-by-val-method-receiver.rs
cleanup: s/impl Copy/#[derive(Copy)]/g
[rust.git] / src / test / run-pass / borrow-by-val-method-receiver.rs
index daed89033fca0bae23727d6f99aaf45cb55cc6c7..e6632fddad959a342441cc8bf3426138bf362959 100644 (file)
@@ -8,16 +8,16 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+
 trait Foo {
     fn foo(self);
 }
 
-impl &[int]: Foo {
+impl<'a> Foo for &'a [int] {
     fn foo(self) {}
 }
 
 pub fn main() {
-    let items = ~[ 3, 5, 1, 2, 4 ];
-    items.foo();
+    let items = vec!( 3, 5, 1, 2, 4 );
+    items.as_slice().foo();
 }
-