Closed
Description
I tried this code:
fn main(){
let line = std::old_io::stdin().read_line().ok().expect("Failed to read line");
let Result<value : u8,_> = line.parse();
println!("{}",value)
}
I expected it to compile or give me a helpful error message.
Instead, this happened:
t2.rs:4:7: 4:13 error: internal compiler error: ident only path should have been covered already
t2.rs:4 let Result<value : u8,_> = line.parse();
^~~~~~
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 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:129
Meta
rustc --version --verbose
:
rustc 1.0.0-nightly (522d09dfe 2015-02-19) (built 2015-02-20)
binary: rustc
commit-hash: 522d09dfecbeca1595f25ac58c6d0178bbd21d7d
commit-date: 2015-02-19
build-date: 2015-02-20
host: x86_64-unknown-linux-gnu
release: 1.0.0-nightly
Backtrace:
stack backtrace:
1: 0x7fdd80fb5210 - sys::backtrace::write::h252031bd050bf19aKlC
2: 0x7fdd80fddac0 - panicking::on_panic::h8a07e978260e2c7btXL
3: 0x7fdd80f1e720 - rt::unwind::begin_unwind_inner::h322bcb3f35268c19RBL
4: 0x7fdd7e20caa0 - rt::unwind::begin_unwind::h4707836431883763822
5: 0x7fdd7e20ca30 - diagnostic::SpanHandler::span_bug::hc8a5aaa027e1ffe4vYE
6: 0x7fdd7e22f440 - parse::parser::Parser<'a>::parse_pat::hb2ecf80c7f350654wLL
7: 0x7fdd7e2454d0 - parse::parser::Parser<'a>::parse_local::h4dbb2e49605b5f8fA1L
8: 0x7fdd7e2456f0 - parse::parser::Parser<'a>::parse_stmt::h82edbd6867b9ac1dv4L
9: 0x7fdd7e24f0a0 - parse::parser::Parser<'a>::parse_block_tail_::h1a3995ee7a4c43efYfM
10: 0x7fdd7e22d830 - parse::parser::Parser<'a>::parse_inner_attrs_and_block::he49e0d8ec104204cieM
11: 0x7fdd7e2536e0 - parse::parser::Parser<'a>::parse_item_fn::hbc31e03198152f3cfVM
12: 0x7fdd7e248370 - parse::parser::Parser<'a>::parse_item_::h60b4bcefd23d6140zUN
13: 0x7fdd7e2598e0 - parse::parser::Parser<'a>::parse_mod_items::h79ee3c5e427ceaaaPjN
14: 0x7fdd7e264e30 - parse::parser::Parser<'a>::parse_crate_mod::h221baa0e96bbcf97FlO
15: 0x7fdd7e277cf0 - parse::parse_crate_from_file::h14706417f2de711evNV
16: 0x7fdd8163f340 - driver::phase_1_parse_input::closure.16948
17: 0x7fdd81619670 - driver::phase_1_parse_input::h6ce7c234588dc89eQra
18: 0x7fdd81616070 - driver::compile_input::h4d3049bece5f3590Gba
19: 0x7fdd816e52b0 - run_compiler::h691fc217cf3d8d57Zbc
20: 0x7fdd816e3bb0 - thunk::F.Invoke<A, R>::invoke::h14302181389313704581
21: 0x7fdd816e2aa0 - rt::unwind::try::try_fn::h15519976819974673451
22: 0x7fdd8104a880 - rust_try_inner
23: 0x7fdd8104a870 - rust_try
24: 0x7fdd816e2da0 - thunk::F.Invoke<A, R>::invoke::h8606420552169060279
25: 0x7fdd80fc9b60 - sys::thread::thread_start::h3defdaea150d8cd693G
26: 0x7fdd7aecb2b0 - start_thread
27: 0x7fdd80ba7249 - __clone
28: 0x0 - <unknown>