]> git.proxmox.com Git - rustc.git/blame - src/test/ui/span/borrowck-call-method-from-mut-aliasable.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / span / borrowck-call-method-from-mut-aliasable.rs
CommitLineData
223e47cc 1struct Foo {
1a4d82fc 2 x: isize,
223e47cc
LB
3}
4
970d7e83
LB
5impl Foo {
6 pub fn f(&self) {}
970d7e83 7 pub fn h(&mut self) {}
223e47cc
LB
8}
9
10fn a(x: &mut Foo) {
11 x.f();
223e47cc
LB
12 x.h();
13}
14
15fn b(x: &Foo) {
16 x.f();
970d7e83 17 x.h(); //~ ERROR cannot borrow
223e47cc
LB
18}
19
223e47cc
LB
20fn main() {
21}