Example with a matching names in a single record: ``` fn main() { let pt = {x: 1, y: 2}; let _x = alt pt { {x, x} { x } }; } ``` Example with two records: ``` fn main() { let pt = {x: 1, y: 2}; let pt2 = {x: 1, y: 2}; let _x = alt (pt, pt2) { ({x, y}, {x, y}) { x } }; } ``` Example with a tuple: ``` fn main() { let _z = alt (1, 2) { (x, x) { x } }; } ``` All give me: ``` rust: task failed at 'Assertion cx.fcx.lllocals.contains_key(nid) failed', /Users/jruderman/code/rust/src/rustc/middle/trans/base.rs:2438 ``` The Rust compiler should catch this before it gets to LLVM.
Activity
catamorphism commentedon Jul 26, 2012
Ooh, fun times. I'll look at it.
Auto merge of rust-lang#3038 - rust-lang:rustup-2023-08-26, r=RalfJung
Update dependencies from `cargo update` (rust-lang#3038)
Merge rust-lang#3038
Merge pull request rust-lang#3038 from rust-lang/tshepang/pull