Skip to content

thread 'rustc' panicked at 'Box<Any>', rustc 0.13.0-nightly (34d680009 2014-12-22 00:12:47 +0000) #20181

Closed
@ctsa

Description

@ctsa

Hi -

First time trying out rust on the nightly. A simple char iterator seemed to be producing a compiler error when invoked with the cargo command line (but note that a simple rustc main.rs succeeded in this case:

$ cat src/main.rs
use std::io;

fn main() {
    let iores = io::stdin().read_line();
    let line = iores.ok().expect("Failed to read line");

    for c in line.chars() {
        println!("{}",c);
    }
}
$ rustc --version
rustc 0.13.0-nightly (34d680009 2014-12-22 00:12:47 +0000)
$ RUST_BACKTRACE=1 rustc /home/csaunders/devel/ctsa/rosalind/rust/0001_dna/src/main.rs --crate-name 0001_dna --crate-type bin -g --out-dir /home/csaunders/devel/ctsa/rosalind/rust/0001_dna/target --emit=dep-info,link -L /home/csaunders/devel/ctsa/rosalind/rust/0001_dna/target -L /home/csaunders/devel/ctsa/rosalind/rust/0001_dna/target/deps
/home/csaunders/devel/ctsa/rosalind/rust/0001_dna/src/main.rs:8:9: 8:10 error: internal compiler error: debuginfo::create_for_loop_var_metadata() - Referenced variable location is not an alloca!
/home/csaunders/devel/ctsa/rosalind/rust/0001_dna/src/main.rs:8     for c in line.chars() {
                                                                        ^
note: the compiler unexpectedly panicked. 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
thread 'rustc' panicked at 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libsyntax/diagnostic.rs:123

stack backtrace:
   1:     0x7fe7a94f77f0 - sys::backtrace::write::hc1f09f1eae19d77aQxt
   2:     0x7fe7a9518710 - failure::on_fail::h0fb87b850ab6cd900Xz
   3:     0x7fe7a94844a0 - rt::unwind::begin_unwind_inner::habde574b4f76ade20Bz
   4:     0x7fe7a4502f00 - rt::unwind::begin_unwind::h16328291673998487577
   5:     0x7fe7a4502e80 - diagnostic::SpanHandler::span_bug::hbb7934a78e265d5dSXF
   6:     0x7fe7a73dc350 - session::Session::span_bug::h8e056d7b667a2fcb1on
   7:     0x7fe7a83632a0 - middle::pat_util::pat_bindings::closure.49058
   8:     0x7fe7a44cdd50 - ast_util::walk_pat::hab0b8805a667994dlxC
   9:     0x7fe7a8290f90 - trans::expr::trans_rvalue_stmt_unadjusted::hb3ffc0f604cb73e4l4i
  10:     0x7fe7a824b2c0 - trans::expr::trans_into::h71668aa506e1a690uGh
  11:     0x7fe7a824ba20 - trans::controlflow::trans_block::hc167a4817215f70d9Zd
  12:     0x7fe7a82f7310 - trans::base::trans_closure::h0f21c829c37744a86au
  13:     0x7fe7a823ffd0 - trans::base::trans_fn::h5a95a6b70c2d9335nmu
  14:     0x7fe7a823b520 - trans::base::trans_item::hf517e1dbb2128044rHu
  15:     0x7fe7a82ff230 - trans::base::trans_crate::he5a814094c8a4da1HDv
  16:     0x7fe7a9a57f70 - driver::phase_4_translate_to_llvm::hc65b794b160978481Ca
  17:     0x7fe7a9a2ee40 - driver::compile_input::hec1a59cac622cf55vba
  18:     0x7fe7a9bd6220 - thunk::F.Invoke<A,$u{20}R$GT$::invoke::h10851168864564136615
  19:     0x7fe7a9bd48d0 - rt::unwind::try::try_fn::h10692001439554181982
  20:     0x7fe7a957c3f0 - rust_try_inner
  21:     0x7fe7a957c3e0 - rust_try
  22:     0x7fe7a9bd4c00 - thunk::F.Invoke<A,$u{20}R$GT$::invoke::h18028200319240022992
  23:     0x7fe7a9507f60 - sys::thread::thread_start::hdeb95f039f29863doww
  24:     0x7fe7a3d040c0 - start_thread
  25:     0x7fe7a9129ec9 - __clone
  26:                0x0 - <unknown>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions