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

fn mutate(_y: &mut i32) {}

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

fn main() {}