Skip to content
Snippets Groups Projects
Unverified Commit 9ce80f68 authored by Alexander Theißen's avatar Alexander Theißen Committed by GitHub
Browse files

Rename PanicInfo to PanicHookInfo (#6865)

Starting with Rust 1.82 `PanicInfo` is deprecated and will throw
warnings when used. The new type is available since Rust 1.81 and should
be available on our CI.

---------

Co-authored-by: command-bot <>
parent 5153e2b5
Branches
No related merge requests found
Pipeline #509319 waiting for manual action with stages
in 17 minutes and 27 seconds
title: Rename PanicInfo to PanicHookInfo
doc:
- audience: Node Dev
description: Starting with Rust 1.82 `PanicInfo` is deprecated and will throw warnings
when used. The new type is available since Rust 1.81 and should be available on
our CI.
crates:
- name: sp-panic-handler
bump: patch
......@@ -30,7 +30,7 @@ use std::{
cell::Cell,
io::{self, Write},
marker::PhantomData,
panic::{self, PanicInfo},
panic::{self, PanicHookInfo},
sync::LazyLock,
thread,
};
......@@ -149,7 +149,7 @@ fn strip_control_codes(input: &str) -> std::borrow::Cow<str> {
}
/// Function being called when a panic happens.
fn panic_hook(info: &PanicInfo, report_url: &str, version: &str) {
fn panic_hook(info: &PanicHookInfo, report_url: &str, version: &str) {
let location = info.location();
let file = location.as_ref().map(|l| l.file()).unwrap_or("<unknown>");
let line = location.as_ref().map(|l| l.line()).unwrap_or(0);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment