Skip to content

assertion failed: st.sized && offset <= st.size #30355

Closed
@mahkoh

Description

@mahkoh
pub struct X([u8]);

pub static Y: &'static X = {
    const Y: &'static [u8] = b"";
    &X(*Y)
};

fn main() { }
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'assertion failed: st.sized && offset <= st.size', ../src/librustc_trans/trans/adt.rs:1307

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions