Skip to content

Rust 1.20.0-nightly ICE with never_type: Broken MIR #43061

Closed
@ngc0202

Description

@ngc0202

The following error results from dereferencing a *const ! as in this code: https://is.gd/SsSDiG

rustc 1.20.0-nightly (734c83642 2017-07-03)
error: internal compiler error: broken MIR (_3 = ()): bad assignment (! = ()): Sorts(ExpectedFound { expected: !, found: () })
 --> <anon>:4:5
  |
4 | /     unsafe {
5 | |         *x;
6 | |     }
  | |_____^

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: rustc 1.20.0-nightly (734c83642 2017-07-03) running on x86_64-unknown-linux-gnu

thread 'rustc' panicked at 'Box<Any>', /checkout/src/librustc_errors/lib.rs:426:8

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions