mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
edafbaffb2
- Either explicitly annotate `let x: () = expr;` where `x` has unit type, or remove the unit binding to leave only `expr;` instead. - Fix disjoint-capture-in-same-closure test
12 lines
241 B
Rust
12 lines
241 B
Rust
// 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 {};
|
|
}
|