Upgrade to Rust 1.82 (#13816)

This commit is contained in:
Micha Reiser 2024-10-19 16:05:50 +02:00 committed by GitHub
parent bd33b4972d
commit 2ff36530c3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 58 additions and 50 deletions

View file

@ -6,6 +6,8 @@ use lsp_types::InitializeParams;
use lsp_types::WorkspaceFolder;
use std::num::NonZeroUsize;
use std::ops::Deref;
// The new PanicInfoHook name requires MSRV >= 1.82
#[allow(deprecated)]
use std::panic::PanicInfo;
use std::str::FromStr;
use thiserror::Error;
@ -125,6 +127,8 @@ impl Server {
}
pub fn run(self) -> crate::Result<()> {
// The new PanicInfoHook name requires MSRV >= 1.82
#[allow(deprecated)]
type PanicHook = Box<dyn Fn(&PanicInfo<'_>) + 'static + Sync + Send>;
struct RestorePanicHook {
hook: Option<PanicHook>,