summaryrefslogtreecommitdiffstats
path: root/tests/ui/nll/issue-47388.rs
blob: 207af380e62ddd58406a2b6391ada8725c30a968 (plain)
1
2
3
4
5
6
7
8
9
10
struct FancyNum {
    num: u8,
}

fn main() {
    let mut fancy = FancyNum{ num: 5 };
    let fancy_ref = &(&mut fancy);
    fancy_ref.num = 6; //~ ERROR E0594
    println!("{}", fancy_ref.num);
}