Fix errors

This commit is contained in:
CreepySkeleton
2019-09-10 02:56:04 +03:00
parent d03cad8fd0
commit ed09109bcb
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -125,7 +125,7 @@ thread_local! {
/// note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
/// ```
pub fn set_dummy(dummy: TokenStream) -> Option<TokenStream> {
DUMMY_IMPL.with(|old_dummy| old_dummy.replace(dummy))
DUMMY_IMPL.with(|old_dummy| old_dummy.replace(Some(dummy)))
}
/// Clear the global error storage, returning the old dummy, if present.
+1 -1
View File
@@ -210,7 +210,7 @@ where
use std::panic::{catch_unwind, resume_unwind, AssertUnwindSafe};
let caught = catch_unwind(AssertUnwindSafe(f));
let dummy = dummy::set_dummy(None);
let dummy = dummy::cleanup();
let err_storage = multi::cleanup();
fn probe_error<T: ToTokens + 'static>(