summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrow-by-val-method-receiver.rs
blob: 465bef1614d43f63da85d775c653043f373c8b32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// 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();
}