blob: f764db35e8c29f208fd4af26860c2b0fe257ed19 [file] [edit]
//! Regression test for <https://github.com/rust-lang/rust/issues/30081>.
//! Misoptimization caused this to segfault.
//@ run-pass
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();
}