Closed
Description
Running this code in either release or debug mode will yield a segfault:
#[derive(Debug)]
pub struct Binding {
action: Action,
mode: u32,
}
#[derive(Debug)]
pub enum Action {
Esc(&'static str),
Paste,
Char(char)
}
static V_BINDINGS: &'static [Binding] = &[
Binding { action: Action::Paste, mode: 0 },
Binding { action: Action::Char('v'), mode: 1 },
];
fn main() {
println!("{:?}", V_BINDINGS);
}
It looks like this also runs successfully on stable, just failing on beta/nightly
cc @jwilm