For error handling and breakpoints, use Box<Any + Send> instead of Box<Any>.

This commit is contained in:
Nick Lewycky
2019-12-09 18:22:30 -08:00
parent 12daaba3fd
commit 0a278c55ee
12 changed files with 36 additions and 34 deletions

View File

@ -856,7 +856,8 @@ pub unsafe extern "C" fn callback_trampoline(
callback: *mut BreakpointHandler,
) {
let callback = Box::from_raw(callback);
let result: Result<(), Box<dyn std::any::Any>> = callback(BreakpointInfo { fault: None });
let result: Result<(), Box<dyn std::any::Any + Send>> =
callback(BreakpointInfo { fault: None });
match result {
Ok(()) => *b = None,
Err(e) => *b = Some(e),