summaryrefslogtreecommitdiffstats
path: root/src/test/ui/macros/span-covering-argument-1.rs
blob: 9b9506c80b150284adb10ed6b08c699b541d1c24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
macro_rules! bad {
    ($s:ident whatever) => {
        {
            let $s = 0;
            *&mut $s = 0;
            //~^ ERROR cannot borrow `foo` as mutable, as it is not declared as mutable [E0596]
        }
    }
}

fn main() {
    bad!(foo whatever);
}