Skip to content

Beta segfault regression #37222

Closed
Closed
@alexcrichton

Description

@alexcrichton

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions