Skip to content

compiler unexpectedly panicked. "this is a bug." #27181

Closed
@davidpbrown

Description

@davidpbrown

Two sets of this error:

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: slice_layout_is_correct(cx, &member_llvm_types[..], element_type)', ../src/librustc_trans/trans/debuginfo/metadata.rs:577

from running cargo test against
./src/libs.rs that is

pub fn anagrams_for(word: &str, inputs: &[str]) -> Vec<&'static str> {
let outputs = vec!["abc","def"];
outputs
}

and ./tests/anagram.rs that is

extern crate anagram;

#[test]
fn test_no_matches() {
    let inputs = ["hello", "world", "zombies", "pants"];
    let outputs: Vec<&str> = vec![];
    assert_eq!(anagram::anagrams_for("diaper", &inputs), outputs);
}

I don't know what I was expecting.. I'm a noob ;p
I set RUST_BACKTRACE=1 but it's not a --bin so couldn't do cargo run easily; cargo build and test don't seem to offer any backtrace that I can see.

Meta

rustc 1.3.0-nightly (118a5c4c3 2015-07-21)
binary: rustc
commit-hash: 118a5c4c342883606fd96b121d741b133caa0347
commit-date: 2015-07-21
host: i686-unknown-linux-gnu
release: 1.3.0-nightly

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)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