Skip to content

Compiler panic in objrs package attribute macros class and root_class #82836

Closed
@ottobommer

Description

@ottobommer

Code

git clone https://gitlab.com/ootoo1/objrs.git
cd objrs/frameworks/foundation/
cargo build

Meta

rustc --version --verbose:

rustc 1.52.0-nightly (caca2121f 2021-03-05)
binary: rustc
commit-hash: caca2121ffe4cb47d8ea2d9469c493995f57e0b5
commit-date: 2021-03-05
host: x86_64-apple-darwin
release: 1.52.0-nightly
LLVM version: 12.0.0

Error output

   Compiling objrs_frameworks_foundation v0.0.3-dev (/Users/ootoo/Projekte/objrs/frameworks/foundation)
error: any use of this value will cause an error
  --> frameworks/foundation/src/nsobject.rs:18:1
   |
18 | #[objrs(class, root_class)]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ inbounds test failed: 0x0 is not a valid pointer
   |
   = note: `#[deny(const_err)]` on by default
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
   = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: any use of this value will cause an error
  --> frameworks/foundation/src/nsobject.rs:18:1
   |
18 | #[objrs(class, root_class)]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
   = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)

thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: Unknown(T)', compiler/rustc_lint/src/types.rs:802:52
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.52.0-nightly (caca2121f 2021-03-05) running on x86_64-apple-darwin

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

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

query stack during panic:
#0 [lint_mod] linting module `nsarray`
#1 [analysis] running analysis passes on this crate
end of query stack

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ICEBreaker-Cleanup-CrewHelping to "clean up" bugs with minimal examples and bisectionsP-mediumMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions