rust/tests/ui/issues/issue-30081.rs
2024-02-16 20:02:50 +00:00

15 lines
309 B
Rust

//@ run-pass
// This used to segfault #30081
pub enum Instruction {
Increment(i8),
Loop(Box<Box<()>>),
}
fn main() {
let instrs: Option<(u8, Box<Instruction>)> = None;
instrs.into_iter()
.map(|(_, instr)| instr)
.map(|instr| match *instr { _other => {} })
.last();
}