]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrow-by-val-method-receiver.rs
Rollup merge of #107769 - compiler-errors:pointer-like, r=eholk
[rust.git] / tests / ui / borrow-by-val-method-receiver.rs
1 // run-pass
2
3 trait Foo {
4     fn foo(self);
5 }
6
7 impl<'a> Foo for &'a [isize] {
8     fn foo(self) {}
9 }
10
11 pub fn main() {
12     let items = vec![ 3, 5, 1, 2, 4 ];
13     items.foo();
14 }