]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/assign-while-to-immutable.rs
Rollup merge of #105216 - GuillaumeGomez:rm-unused-gui-test, r=notriddle
[rust.git] / src / test / ui / nll / assign-while-to-immutable.rs
1 // We used to incorrectly assign to `x` twice when generating MIR for this
2 // function, preventing this from compiling.
3
4 // check-pass
5
6 fn main() {
7     let x = while false {
8         break;
9     };
10     let y = 'l: while break 'l {};
11 }