Skip to content

Commit

Permalink
Rust 1.82.0
Browse files Browse the repository at this point in the history
  • Loading branch information
GearsDatapacks authored and PgBiel committed Nov 4, 2024
1 parent e635d1e commit bbaeb75
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler-cli/src/panic.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#![allow(clippy::unwrap_used)]
use std::panic::PanicInfo;
use std::panic::PanicHookInfo;

pub fn add_handler() {
std::panic::set_hook(Box::new(move |info: &PanicInfo<'_>| {
std::panic::set_hook(Box::new(move |info: &PanicHookInfo<'_>| {
print_compiler_bug_message(info)
}));
}

fn print_compiler_bug_message(info: &PanicInfo<'_>) {
fn print_compiler_bug_message(info: &PanicHookInfo<'_>) {
let message = match (
info.payload().downcast_ref::<&str>(),
info.payload().downcast_ref::<String>(),
Expand Down

0 comments on commit bbaeb75

Please sign in to comment.