]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrow-by-val-method-receiver.rs
Rollup merge of #101388 - compiler-errors:issue-101376, r=fee1-dead
[rust.git] / src / test / 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 }