mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-19 00:31:19 +00:00
Introduce more appropriate assertion mechanism
rust-analyzer is a long-running program, so we *should* handle assertion failures. See also https://www.sqlite.org/assert.html.
This commit is contained in:
parent
865e05b5b4
commit
8dc68ecdfc
8 changed files with 72 additions and 7 deletions
|
@ -4,6 +4,8 @@ use std::{cmp::Ordering, ops, process, time::Instant};
|
|||
mod macros;
|
||||
pub mod panic_context;
|
||||
|
||||
pub use crate::macros::{on_assert_failure, set_assert_hook};
|
||||
|
||||
#[inline(always)]
|
||||
pub fn is_ci() -> bool {
|
||||
option_env!("CI").is_some()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue