1 // Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
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.
13 // This test is bogus (i.e. should be compile-fail) during the period
14 // where #54986 is implemented and #54987 is *not* implemented. For
15 // now: just ignore it under nll
17 // ignore-compare-mode-nll
19 // These are variants of issue-26996.rs. In all cases we are writing
20 // into a record field that has been moved out of, and ensuring that
21 // such a write won't overwrite the state of the thing it was moved
24 // That's a fine thing to test when this code is accepted by the
25 // compiler, and this code is being transcribed accordingly into
26 // the ui test issue-21232-partial-init-and-use.rs
29 let mut c = (1, (1, "".to_owned()));
31 c2 => { (c.1).0 = 2; assert_eq!((c2.1).0, 1); }
34 let mut c = (1, (1, (1, "".to_owned())));
36 c2 => { ((c.1).1).0 = 3; assert_eq!((c2.1).0, 1); }