]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/two-phase-method-receivers.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / 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 }