Closed
Description
Source code:
// fine
// fn lex<I, E>(it: &mut I) where I: Iterator<Result<char, E>> {
// for val in *it {
// match val {
// Ok(c) => println!("{}", c),
// _ => ()
// }
// }
// }
// boom
fn lex<I, E>(it: &mut I) where I: std::iter::Iterator<Result<char, E>> {
for val in *it {
match val {
Ok(c) => println!("{}", c),
_ => ()
}
}
}
fn main() {
lex(&mut std::io::stdio::stdin().chars());
}
Error report:
> RUST_BACKTRACE=1 rustc src/main.rs
src/main.rs:12:35: 12:71 error: internal compiler error: unprocessed lint unnecessary_qualification at unknown node (id=14): unnecessary qualification
src/main.rs:12 fn lex<I, E>(it: &mut I) where I: std::iter::Iterator<Result<char, E>> {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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>', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libsyntax/diagnostic.rs:113
stack backtrace:
1: 0x10940ad69 - rt::backtrace::imp::write::h2743addf9d4e09ca3Lq
2: 0x10940e081 - failure::on_fail::h5878bf339c2c0d1eH2q
3: 0x10967ee55 - unwind::begin_unwind_inner::h4e3cb6f9f8acbab0Lud
4: 0x108a5bcb7 - unwind::begin_unwind::h16690314784075414690
5: 0x108a5bc50 - unwind::begin_unwind::h16690314784075414690
6: 0x10615dd3d - driver::session::Session::span_bug::h33b62a9218d1e0ee8sy
7: 0x1068a957a - lint::context::check_crate::h069beb786f0ea1a84DF
8: 0x105f9cb56 - util::common::time::h9411186061348806338
9: 0x1068518d0 - driver::driver::phase_3_run_analysis_passes::hcb20fa7c461ba3dceKx
10: 0x10684ac9f - driver::driver::compile_input::hdae46a8c91fbd7db0qx
11: 0x1068d4114 - driver::run_compiler::hfca79e3b04f1e387jfB
12: 0x1068d2246 - driver::run::closure.147682
13: 0x105fb5eeb - task::TaskBuilder<S>::try_future::closure.101754
14: 0x105fb5dd3 - task::TaskBuilder<S>::spawn_internal::closure.101725
15: 0x10911879d - task::spawn_opts::closure.8528
16: 0x1096e695c - rust_try_inner
17: 0x1096e6946 - rust_try
18: 0x10967c4c7 - unwind::try::h02eaf02110b5e7b2tjd
19: 0x10967c34c - task::Task::run::ha0919a84fddfd7a3Ezc
20: 0x1091185c2 - task::spawn_opts::closure.8467
21: 0x10967dd0a - thread::thread_start::h6553ef4f6ad4be5fPTc
22: 0x7fff883c7899 - _pthread_body
23: 0x7fff883c772a - _pthread_struct_init
I'm using
> rustc -v
rustc 0.13.0-nightly (1add4dedc 2014-10-10 18:47:03 +0000)
> sw_vers
ProductName: Mac OS X
ProductVersion: 10.9.5
BuildVersion: 13F34