Fix incorrect double assignment in MIR for while loops

This commit is contained in:
Matthew Jasper 2019-06-15 10:08:20 +01:00
parent 5f9c0448dd
commit 62bec71446
2 changed files with 25 additions and 6 deletions

View file

@ -0,0 +1,11 @@
// We used to incorrectly assign to `x` twice when generating MIR for this
// function, preventing this from compiling.
// check-pass
fn main() {
let x = while false {
break;
};
let y = 'l: while break 'l {};
}