]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/two-phase-method-receivers.rs
Rollup merge of #102270 - Nilstrieb:delete-useless-benches, r=TaKO8Ki
[rust.git] / src / test / ui / borrowck / two-phase-method-receivers.rs
1 // run-pass
2
3 struct Foo<'a> {
4     x: &'a i32
5 }
6
7 impl<'a> Foo<'a> {
8     fn method(&mut self, _: &i32) {
9     }
10 }
11
12 fn main() {
13     let a = &mut Foo { x: &22 };
14     Foo::method(a, a.x);
15 }