Closed
Description
extern { pub static FOO: extern "rust-intrinsic" fn(); }
fn main() { FOO() }
> rustc a.rs
a.rs:1:26: 1:54 warning: found function pointer with Rust calling convention in foreign module; consider using an `extern` function pointer, #[warn(improper_ctypes)] on by default
a.rs:1 extern { pub static FOO: extern "rust-intrinsic" fn(); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
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: abi != synabi::RustIntrinsic && abi != synabi::PlatformIntrinsic', ../src/librustc_trans\trans\callee.rs:707
Metadata
Metadata
Assignees
Labels
Area: Code generationCategory: This is a bug.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Relevant to the compiler team, which will review and decide on the PR/issue.This issue requires a nightly compiler in some way.