diff options
-rw-r--r-- | crates/rust-analyzer/src/bin/main.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/bin/main.rs b/crates/rust-analyzer/src/bin/main.rs index 2f7f94a39..1d6e5478b 100644 --- a/crates/rust-analyzer/src/bin/main.rs +++ b/crates/rust-analyzer/src/bin/main.rs | |||
@@ -76,7 +76,12 @@ fn setup_logging(log_file: Option<PathBuf>) -> Result<()> { | |||
76 | profile::init(); | 76 | profile::init(); |
77 | 77 | ||
78 | if !cfg!(debug_assertions) { | 78 | if !cfg!(debug_assertions) { |
79 | stdx::set_assert_hook(|loc, args| log::error!("assertion failed at {}: {}", loc, args)); | 79 | stdx::set_assert_hook(|loc, args| { |
80 | if env::var("RA_PROFILE").is_ok() { | ||
81 | panic!("assertion failed at {}: {}", loc, args) | ||
82 | } | ||
83 | log::error!("assertion failed at {}: {}", loc, args) | ||
84 | }); | ||
80 | } | 85 | } |
81 | 86 | ||
82 | Ok(()) | 87 | Ok(()) |