]> git.lizzy.rs Git - rust.git/blob - tests/ui/match/issue-26996.rs
Auto merge of #106812 - oli-obk:output_filenames, r=petrochenkov
[rust.git] / tests / ui / match / issue-26996.rs
1 // run-pass
2
3 // This test is bogus (i.e., should be check-fail) during the period
4 // where #54986 is implemented and #54987 is *not* implemented. For
5 // now: just ignore it
6 //
7 // ignore-test
8
9 // This test is checking that the write to `c.0` (which has been moved out of)
10 // won't overwrite the state in `c2`.
11 //
12 // That's a fine thing to test when this code is accepted by the
13 // compiler, and this code is being transcribed accordingly into
14 // the ui test issue-21232-partial-init-and-use.rs
15
16 fn main() {
17     let mut c = (1, "".to_owned());
18     match c {
19         c2 => {
20             c.0 = 2;
21             assert_eq!(c2.0, 1);
22         }
23     }
24 }