rust/tests/ui/borrow-by-val-method-receiver.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
175 B
Rust
Raw Normal View History

//@ run-pass
trait Foo {
fn foo(self);
}
impl<'a> Foo for &'a [isize] {
fn foo(self) {}
}
pub fn main() {
let items = vec![ 3, 5, 1, 2, 4 ];
items.foo();
}