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

Nightly panics <rustc_errors::diagnostic_builder::DiagnosticBuilder<'a> as core::ops::Drop>::drop #41239

Closed
dpc opened this issue Apr 11, 2017 · 1 comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@dpc
Copy link
Contributor

dpc commented Apr 11, 2017

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', /checkout/src/librustc_errors/diagnostic_builder.rs:192
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: <rustc_errors::diagnostic_builder::DiagnosticBuilder<'a> as core::ops::Drop>::drop
   1: syntax::parse::parser::Parser::parse_impl_item
   2: syntax::parse::parser::Parser::parse_item_impl
   3: syntax::parse::parser::Parser::parse_item_
   4: syntax::parse::parser::Parser::parse_item
   5: syntax::parse::parser::Parser::parse_mod_items
   6: syntax::parse::parser::Parser::parse_crate_mod
   7: syntax::parse::parse_crate_from_file
   8: rustc_driver::driver::phase_1_parse_input::{{closure}}
   9: rustc_driver::driver::phase_1_parse_input
  10: rustc_driver::driver::compile_input
  11: rustc_driver::run_compiler
  12: std::panicking::try::do_call
  13: __rust_maybe_catch_panic
             at /checkout/src/libpanic_unwind/lib.rs:98
  14: <F as alloc::boxed::FnBox<A>>::call_box
  15: std::sys::imp::thread::Thread::new::thread_start
             at /checkout/src/liballoc/boxed.rs:650
             at /checkout/src/libstd/sys_common/thread.rs:21
             at /checkout/src/libstd/sys/unix/thread.rs:84
  16: start_thread
  17: clone

error: Could not compile `slog-atomic`.

To learn more, run the command again with --verbose.

while compiling slog-atomic = "2.0.0-3.1" with the following change (I was just testing errors in Vim and introduced random error):

diff --git a/lib.rs b/lib.rs
index 6ac461e..ac47c1b 100644
--- a/lib.rs
+++ b/lib.rs
@@ -59,7 +59,7 @@ impl<O, E> AtomicSwitchCtrl<O, E> {
                 -> Arc<Box<SendSyncRefUnwindSafeDrain<Ok = O, Err = E>>> {
         self.0.set(drain)
     }
-
+s
     /// Get a `AtomicSwitch` drain controlled by this `AtomicSwitchCtrl`
     pub fn drain(&self) -> AtomicSwitch<O, E> {
         AtomicSwitch(self.0.clone())
@sfackler sfackler added A-diagnostics Area: Messages for errors, warnings, and lints I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ labels Apr 12, 2017
@TimNN
Copy link
Contributor

TimNN commented Apr 13, 2017

Probably a duplicate of #41161.

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
libsyntax/parse: fix missing kind error reporting

Fixes #41161.
Fixes #41239.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

3 participants