Skip to content

error: internal compiler error: compiler\rustc_lint\src\types.rs:859:17: malformed transparent type #93419

Closed
@SStarosielec

Description

@SStarosielec
// minimal example: each line and derive seems important.

extern "C" {
    pub fn Fg_Init() -> *mut Fg_Struct;
}

#[derive(Debug, Copy, Clone)]
pub struct Fg_Struct_s {
    _unused: [u8; 0],
}

#[repr(transparent)]
pub struct Fg_Struct(pub Fg_Struct_s);

fn main() {
    println!("Hello, world!");
}

Meta

rustc --version --verbose:

rustc 1.56.1 (59eed8a2a 2021-11-01)
binary: rustc
commit-hash: 59eed8a2aac0230a8b53e89d4e99d55912ba6b35
commit-date: 2021-11-01
host: x86_64-pc-windows-msvc
release: 1.56.1
LLVM version: 13.0.0

Error output

error: internal compiler error: compiler\rustc_lint\src\types.rs:859:17: malformed transparent type
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
note: the compiler unexpectedly panicked. this is a bug.
Backtrace

query stack during panic:
#0 [lint_mod] linting top-level module
#1 [analysis] running analysis passes on this crate
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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions