Closed
Description
This broken code snippet:
pub trait Nothing<'a> {
fn nothing(&'a mut self) -> ();
fn twice_nothing(&mut self) -> () {
{ self.nothing(); }
{ self.nothing(); }
}
}
Appears to crash the error reporting code:
error: internal compiler error: unexpected failure
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 'expect item fn', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libcore/option.rs:315
stack backtrace:
1: 0x7f58ea22c1a0 - rt::backtrace::imp::write::h09cd946771ab0c0fGGq
2: 0x7f58ea22f330 - failure::on_fail::h4d3c6393a0c3a65581q
3: 0x7f58ea9fc510 - unwind::begin_unwind_inner::hacf1a8f1e565f619SUd
4: 0x7f58ea9fc070 - unwind::begin_unwind_fmt::h080aba0452d8c216kSd
5: 0x7f58ea9fc030 - rust_begin_unwind
6: 0x7f58eaa44350 - failure::fail_fmt::hbfb8f595be3564a4oqk
7: 0x7f58eb4055f0 - middle::typeck::infer::error_reporting::InferCtxt<'a, 'tcx>.ErrorReporting::give_suggestion::he83398a7946440e9tK5
8: 0x7f58eb3fbfc0 - middle::typeck::infer::error_reporting::InferCtxt<'a, 'tcx>.ErrorReporting::report_processed_errors::hc65a1791d426f721xJ5
9: 0x7f58eb3f44c0 - middle::typeck::infer::error_reporting::InferCtxt<'a, 'tcx>.ErrorReporting::report_region_errors::h793e1a0eba4d8bac0V4
10: 0x7f58eb303540 - middle::typeck::infer::InferCtxt<'a, 'tcx>::resolve_regions_and_report_errors::h01a376efbdc61f92the
11: 0x7f58eb303760 - middle::typeck::check::regionck::regionck_fn::he43dc94f3751ced6hYM
12: 0x7f58eb349040 - middle::typeck::check::check_bare_fn::ha87adcf3bff90adaxRS
13: 0x7f58eb3514f0 - middle::typeck::check::check_method_body::h1a37bdcbedcdc1dehuT
14: 0x7f58eb344e50 - middle::typeck::check::check_item::h767abed1c6c4a34dAjT
15: 0x7f58eb3472d0 - visit::walk_item::h12207423757898312865
16: 0x7f58eb348af0 - middle::typeck::check::check_item_types::hf248928e4dabd6b2HQS
17: 0x7f58eadf3640 - util::common::time::h2616922191819368531
18: 0x7f58eb626bd0 - middle::typeck::check_crate::h484d4bed9f589896DVk
19: 0x7f58eb6913f0 - driver::driver::phase_3_run_analysis_passes::h2f79f56e810f6357Ptx
20: 0x7f58eb68cc00 - driver::driver::compile_input::h73c51e1958276bfeBax
21: 0x7f58eb70ee90 - driver::run_compiler::h0582589c54a9149bS0A
22: 0x7f58eb70ed70 - driver::run::closure.147672
23: 0x7f58eae0c5d0 - task::TaskBuilder<S>::try_future::closure.101696
24: 0x7f58eae0c3c0 - task::TaskBuilder<S>::spawn_internal::closure.101667
25: 0x7f58ec036f70 - task::spawn_opts::closure.8474
26: 0x7f58eaa517d0 - rust_try_inner
27: 0x7f58eaa517c0 - rust_try
28: 0x7f58ea9f96a0 - unwind::try::h95b9313d07b2b144AJd
29: 0x7f58ea9f9530 - task::Task::run::h0a905e55c2a230beUYc
30: 0x7f58ec036ce0 - task::spawn_opts::closure.8414
31: 0x7f58ea9fb5b0 - thread::thread_start::hdbeb91d615fae747pjd
32: 0x7f58e9cf9dc0 - start_thread
33: 0x0 - <unknown>