mirror of
https://github.com/openharmony/third_party_rust_proc-macro-error.git
synced 2026-07-21 03:45:26 -04:00
Fix errors
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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>(
|
||||
|
||||
Reference in New Issue
Block a user