Skip to content

-Z print-type-sizes: internal error: entered unreachable code: FieldsShape::offset: Primitives have no fields' #86528

Closed
@jyn514

Description

@jyn514

Code

rust-lang/docs.rs@69b1f3d

MCVE:

pub fn test() {
    Vec::<()>::new()
        .into_iter()
        .filter(|_| true)
        .collect::<Vec<_>>();
}

Meta

rustc --version: rustc 1.54.0-nightly (cc77ba46f 2021-06-03)

Error output

thread 'rustc' panicked at 'internal error: entered unreachable code: FieldsShape::offset: `Primitive`s have no fields', compiler\rustc_target\src\abi\mod.rs:768:17
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.54.0-nightly (cc77ba46f 2021-06-03) running on x86_64-pc-windows-msvc

note: compiler flags: -Z print-type-sizes -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type lib

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions