rust/tests/ui/nll/assign-while-to-immutable.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
233 B
Rust
Raw Normal View History

// 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 {};
}