]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/borrow-by-val-method-receiver.rs
Rollup merge of #58306 - GuillaumeGomez:crate-browser-history, r=QuietMisdreavus
[rust.git] / src / test / run-pass / borrow-by-val-method-receiver.rs
1 trait Foo {
2     fn foo(self);
3 }
4
5 impl<'a> Foo for &'a [isize] {
6     fn foo(self) {}
7 }
8
9 pub fn main() {
10     let items = vec![ 3, 5, 1, 2, 4 ];
11     items.foo();
12 }