]> git.proxmox.com Git - rustc.git/blame - src/test/ui/nll/issue-47388.rs
New upstream version 1.32.0~beta.2+dfsg1
[rustc.git] / src / test / ui / nll / issue-47388.rs
CommitLineData
83c7162d 1// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
223e47cc
LB
2// file at the top-level directory of this distribution and at
3// http://rust-lang.org/COPYRIGHT.
4//
5// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8// option. This file may not be copied, modified, or distributed
9// except according to those terms.
83c7162d
XL
10#![feature(nll)]
11struct FancyNum {
12 num: u8,
476ff2be 13}
041b39d2
XL
14
15fn main() {
83c7162d
XL
16 let mut fancy = FancyNum{ num: 5 };
17 let fancy_ref = &(&mut fancy);
18 fancy_ref.num = 6; //~ ERROR E0594
19 println!("{}", fancy_ref.num);
041b39d2 20}