Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Error constructed but not emitted" ICE on nightly parsing wonky impl #41161

Closed
ben0x539 opened this Issue Apr 8, 2017 · 2 comments

Comments

Projects
None yet
7 participants
@ben0x539
Copy link
Contributor

ben0x539 commented Apr 8, 2017

rustc 1.18.0-nightly (53f4bc3 2017-04-07)
stable/beta/nightly from a week ago seem unaffected.

$ cat > bug.rs
impl X{Y}
$ RUST_BACKTRACE=full rustc bug.rs 
error: internal compiler error: Error constructed but not emitted
 
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 'explicit panic', src/librustc_errors/diagnostic_builder.rs:192
stack backtrace:
   0:        0x10fd12e83 - std::sys::imp::backtrace::tracing::imp::unwind_backtrace::hcc709dd93d82a051
   1:        0x10fd1fafd - std::panicking::default_hook::{{closure}}::he392668e67778d9e 
   2:        0x10fd1f644 - std::panicking::default_hook::h2ade4aa81d4f8204
   3:        0x10fd22277 - std::panicking::rust_panic_with_hook::h4573918fc9f80a34
   4:        0x10d2aa534 - std::panicking::begin_panic::h2a5fc248b95a3db2
   5:        0x10d2b143b - <rustc_errors::diagnostic_builder::DiagnosticBuilder<'a> as core::ops::Drop>::drop::h12de2c56938d20bb
   6:        0x10cdd289b - syntax::parse::parser::Parser::parse_impl_item::h3ddc1b71a9135797
   7:        0x10cdd50c1 - syntax::parse::parser::Parser::parse_item_impl::h284e44c48881ab63
   8:        0x10cde1356 - syntax::parse::parser::Parser::parse_item_::h44415882723eb725
   9:        0x10cdeabd8 - syntax::parse::parser::Parser::parse_item::h923de9a5bd86a0a8
  10:        0x10cdd8d5e - syntax::parse::parser::Parser::parse_mod_items::hf3c521b150993a7f
  11:        0x10cdeb7dd - syntax::parse::parser::Parser::parse_crate_mod::h19282d20641c273e
  12:        0x10cdfb19e - syntax::parse::parse_crate_from_file::hdab1619deb4b8e47
  13:        0x10b02655c - rustc_driver::driver::phase_1_parse_input::{{closure}}::hadf9f24a52d977ac
  14:        0x10b0255c5 - rustc_driver::driver::phase_1_parse_input::h4228cea37031992a
  15:        0x10b018554 - rustc_driver::driver::compile_input::h163f6d3afe612689
  16:        0x10b076046 - rustc_driver::run_compiler::h870480169c099057
  17:        0x10af49fa8 - std::panicking::try::do_call::h122fb7737645584e
  18:        0x10fd2508a - __rust_maybe_catch_panic
  19:        0x10af907ef - <F as alloc::boxed::FnBox<A>>::call_box::hdbb485c2e5737f1e
  20:        0x10fd1eae4 - std::sys::imp::thread::Thread::new::thread_start::hba7593f2e1f1beb1
  21:     0x7fff884f899c - _pthread_body
  22:     0x7fff884f8919 - _pthread_start

Reduced from impl Iterator for Foo { Item = Bar; ... } where I forgot the type.

@mgattozzi

This comment has been minimized.

Copy link
Member

mgattozzi commented Apr 12, 2017

I had the same issue. I've pushed a separate branch of my library as a test case if needed to check if this gets fixed.

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Apr 13, 2017

triage: P-medium

@rust-highfive rust-highfive added P-medium and removed I-nominated labels Apr 13, 2017

arielb1 added a commit to arielb1/rust that referenced this issue Apr 17, 2017

bors added a commit that referenced this issue Apr 17, 2017

Auto merge of #41282 - arielb1:missing-impl-item, r=petrochenkov
libsyntax/parse: fix missing kind error reporting

Fixes #41161.
Fixes #41239.

@bors bors closed this in #41282 Apr 18, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.