about summary refs log tree commit diff
path: root/tests/ui/pattern/patkind-ref-binding-issue-122415.rs
blob: b9f6416027a37d04ec3e43fe0b8338367501fbf2 (plain)
1
2
3
4
5
6
7
8
9
10
11
//@ run-rustfix
#![allow(dead_code)]

fn mutate(_y: &mut i32) {}

fn foo(&x: &i32) {
    mutate(&mut x);
    //~^ ERROR cannot borrow `x` as mutable
}

fn main() {}