Closed
Description
// 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