mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-21 04:03:11 +00:00
explain why we use resume_unwind
This commit is contained in:
parent
f72c031eb9
commit
86bc898a2f
@ -29,6 +29,8 @@ impl Canceled {
|
||||
}
|
||||
|
||||
pub fn throw() -> ! {
|
||||
// We use resume and not panic here to avoid running the panic
|
||||
// hook (that is, to avoid collecting and printing backtrace).
|
||||
std::panic::resume_unwind(Box::new(Canceled::new()))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user