// 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();
}
-