Skip to content

ICE: can't dereference const of type [char, .. 64] with &'static[char] constant #16911

Closed
@dyrim

Description

@dyrim

This code:

static FOOBAR: &'static[char] = ['A'];

Causes the following error for me:

error: internal compiler error: can't dereference const of type [char, .. 1]
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'Box<Any>', /build/rust-git/src/rust/src/libsyntax/ast_util.rs:784

Rust version:

$ rustc --version
rustc 0.12.0-pre (5419b2ca2 2014-08-29 22:16:20 +0000)

Playpen showing the same error is here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-DSTsArea: Dynamically-sized types (DSTs)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