mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
16 lines
308 B
Rust
16 lines
308 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();
|
|
}
|