From e1150408e2b8a02d87f957b55be0e603f2911cb3 Mon Sep 17 00:00:00 2001 From: Alex Hornby Date: Sun, 20 Oct 2024 11:00:06 -0700 Subject: [PATCH] rust-shed: fix build with rust 1.82 (#60) Summary: Pull Request resolved: https://github.com/facebookexperimental/rust-shed/pull/60 Rust 1.82 deprecated std::panic::PanicInfo for its new name since 1.81 std::panic::PanicInfoHook. This should fix github CI for rust-shed Reviewed By: dtolnay Differential Revision: D64618466 fbshipit-source-id: 885504da4a7b629dbab772580b0c473db66f232f --- shed/panichandler/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shed/panichandler/src/lib.rs b/shed/panichandler/src/lib.rs index 0a1c0ca19..b9ecad94e 100644 --- a/shed/panichandler/src/lib.rs +++ b/shed/panichandler/src/lib.rs @@ -16,7 +16,7 @@ use std::io; use std::io::BufWriter; use std::io::Write; use std::panic; -use std::panic::PanicInfo; +use std::panic::PanicHookInfo; use std::ptr; use backtrace::Backtrace; @@ -40,7 +40,7 @@ pub enum Fate { Abort, } -fn handler(panic: &PanicInfo<'_>, fate: Fate) { +fn handler(panic: &PanicHookInfo<'_>, fate: Fate) { let stderr = io::stderr(); let mut w = BufWriter::new(stderr.lock());