Open
Description
auto-reduced (treereduce-rust):
#![feature(extern_types)]
#[link(name = "bar", import_name_type = "decorated", kind = "raw-dylib")]
extern "C" {
pub type CrossCrate;
}
fn main() {}
original:
#![feature(extern_types)]
// only-windows
// only-x86
#[link(name = "foo", import_name_type = "decorated")]
//~^ ERROR import name type can only be used with link kind `raw-dylib`
extern "C" { }
#[link(name = "bar", kind = "static", import_name_type = "decorated")]
//~^ ERROR import name type can only be used with link kind `raw-dylib`
extern "C" { }
// Specifying `import_name_type` before `kind` shouldn't raise an error.
#[link(name = "bar", import_name_type = "decorated", kind = "raw-dylib")]
extern "C" {
pub type CrossCrate;
}
fn main() {}
Version information
rustc 1.77.0-dev
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.77.0-dev
LLVM version: 17.0.6
Metadata
Metadata
Assignees
Labels
Category: This is a bug.`#![feature(extern_types)]`Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Status: This bug is tracked inside the repo by a `known-bug` test.Relevant to the compiler team, which will review and decide on the PR/issue.This issue requires a build of rustc or tooling with debug-assertions in some way