blob: 59b541a24d1bb6cbf73eb319ea8b0e87570cac22 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
// Suggest not mutably borrowing a mutable reference
#![crate_type = "rlib"]
pub fn f(b: &mut i32) {
g(&mut b);
//~^ ERROR cannot borrow
g(&mut &mut b);
//~^ ERROR cannot borrow
}
pub fn g(_: &mut i32) {}
|