about summary refs log tree commit diff
path: root/tests/ui/binop/nested-assignment-may-be-deref.rs
blob: f675ab2e9183cc3066981e62091a5471b02b458f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
pub fn bad(x: &mut bool) {
    if true
    *x = true {}
    //~^ ERROR cannot multiply `bool` by `&mut bool`
}

pub fn bad2(x: &mut bool) {
    let y: bool;
    y = true
    *x = true;
    //~^ ERROR cannot multiply `bool` by `&mut bool`
}

fn main() {}