mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
use unwinding for cancelation
This commit is contained in:
parent
cf20ecae9f
commit
64455ad701
6 changed files with 61 additions and 43 deletions
|
@ -27,6 +27,10 @@ impl Canceled {
|
|||
pub(crate) fn new() -> Canceled {
|
||||
Canceled { _private: () }
|
||||
}
|
||||
|
||||
pub fn throw() -> ! {
|
||||
std::panic::resume_unwind(Box::new(Canceled::new()))
|
||||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Display for Canceled {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue