Skip to content

Compiler Panicked when compiling tutorial application of safer_ffi #79894

Closed
@okpatil4u

Description

@okpatil4u

While compiling safer_ffi tutorial example, I encountered following panic

Compiling proc-macro2 v1.0.24
   Compiling unicode-xid v0.2.1
   Compiling syn v1.0.54
   Compiling proc-macro-hack v0.5.19
   Compiling libc v0.2.81
   Compiling mini_paste-proc_macro v0.1.11
   Compiling mini_paste v0.1.11
   Compiling quote v1.0.7
   Compiling safer_ffi-proc_macro v0.0.5
   Compiling require_unsafe_in_body v0.2.1
   Compiling safer-ffi v0.0.5
   Compiling crate_name v0.1.0 (/Users/omkarpatil/experiments/samples/ffi/safe_ffi)
thread 'rustc' panicked at 'Expected module, found DefId(16:190)', compiler/rustc_metadata/src/rmeta/decoder.rs:1198:13
note: run with `RUST_BACKTRACE=1` environment variable to display a 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.48.0 (7eac88abb 2020-11-16) running on x86_64-apple-darwin

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type staticlib

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

error: could not compile `crate_name`

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