Closed
Description
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())