Upgrade Rust to 1.82.0 (#34592)

* Fix deprecated PanicInfo alias

Fixes:
```rust
use of deprecated type alias `std::panic::PanicInfo`: use `PanicHookInfo` instead
```

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>

* build: upgrade rustc to 1.82.0

Tracking issue for the silenced lints:
https://github.com/servo/servo/issues/34591

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
Jonathan Schwender 2024-12-12 13:00:51 +01:00 committed by GitHub
parent c0703b605d
commit 6a816649d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 23 additions and 5 deletions

View file

@ -13,7 +13,7 @@ authors = ["The Servo Project Developers"]
license = "MPL-2.0" license = "MPL-2.0"
edition = "2021" edition = "2021"
publish = false publish = false
rust-version = "1.81.0" rust-version = "1.82.0"
[workspace.dependencies] [workspace.dependencies]
accountable-refcell = "0.2.0" accountable-refcell = "0.2.0"

View file

@ -1177,6 +1177,8 @@ where
)] )]
fn handle_request(&mut self) { fn handle_request(&mut self) {
#[derive(Debug)] #[derive(Debug)]
// FIXME: https://github.com/servo/servo/issues/34591
#[expect(clippy::large_enum_variant)]
enum Request { enum Request {
PipelineNamespace(PipelineNamespaceRequest), PipelineNamespace(PipelineNamespaceRequest),
Script((PipelineId, FromScriptMsg)), Script((PipelineId, FromScriptMsg)),

View file

@ -132,6 +132,8 @@ pub struct SessionHistoryChange {
} }
/// Represents a pipeline or discarded pipeline in a history entry. /// Represents a pipeline or discarded pipeline in a history entry.
// FIXME: https://github.com/servo/servo/issues/34591
#[expect(clippy::large_enum_variant)]
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
pub enum NeedsToReload { pub enum NeedsToReload {
/// Represents a pipeline that has not been discarded /// Represents a pipeline that has not been discarded
@ -176,6 +178,8 @@ impl PartialEq for NeedsToReload {
} }
/// Represents a the difference between two adjacent session history entries. /// Represents a the difference between two adjacent session history entries.
// FIXME: https://github.com/servo/servo/issues/34591
#[expect(clippy::large_enum_variant)]
#[derive(Debug)] #[derive(Debug)]
pub enum SessionHistoryDiff { pub enum SessionHistoryDiff {
/// Represents a diff where the active pipeline of an entry changed. /// Represents a diff where the active pipeline of an entry changed.

View file

@ -52,6 +52,8 @@ pub enum DevtoolsControlMsg {
} }
/// Events that the devtools server must act upon. /// Events that the devtools server must act upon.
// FIXME: https://github.com/servo/servo/issues/34591
#[expect(clippy::large_enum_variant)]
#[derive(Debug)] #[derive(Debug)]
pub enum ChromeToDevtoolsControlMsg { pub enum ChromeToDevtoolsControlMsg {
/// A new client has connected to the server. /// A new client has connected to the server.

View file

@ -183,6 +183,8 @@ impl From<ReferrerPolicy> for ReferrerPolicyHeader {
} }
} }
// FIXME: https://github.com/servo/servo/issues/34591
#[expect(clippy::large_enum_variant)]
#[derive(Debug, Deserialize, Serialize)] #[derive(Debug, Deserialize, Serialize)]
pub enum FetchResponseMsg { pub enum FetchResponseMsg {
// todo: should have fields for transmitted/total bytes // todo: should have fields for transmitted/total bytes
@ -239,6 +241,8 @@ pub enum FilteredMetadata {
OpaqueRedirect(ServoUrl), OpaqueRedirect(ServoUrl),
} }
// FIXME: https://github.com/servo/servo/issues/34591
#[expect(clippy::large_enum_variant)]
#[derive(Clone, Debug, Deserialize, Serialize)] #[derive(Clone, Debug, Deserialize, Serialize)]
pub enum FetchMetadata { pub enum FetchMetadata {
Unfiltered(Metadata), Unfiltered(Metadata),
@ -502,6 +506,8 @@ pub enum CoreResourceMsg {
Exit(IpcSender<()>), Exit(IpcSender<()>),
} }
// FIXME: https://github.com/servo/servo/issues/34591
#[expect(clippy::large_enum_variant)]
enum ToFetchThreadMessage { enum ToFetchThreadMessage {
StartFetch( StartFetch(
/* request_builder */ RequestBuilder, /* request_builder */ RequestBuilder,

View file

@ -271,6 +271,8 @@ pub enum UpdatePipelineIdReason {
} }
/// Messages sent from the constellation or layout to the script thread. /// Messages sent from the constellation or layout to the script thread.
// FIXME: https://github.com/servo/servo/issues/34591
#[expect(clippy::large_enum_variant)]
#[derive(Deserialize, Serialize)] #[derive(Deserialize, Serialize)]
pub enum ConstellationControlMsg { pub enum ConstellationControlMsg {
/// Takes the associated window proxy out of "delaying-load-events-mode", /// Takes the associated window proxy out of "delaying-load-events-mode",

View file

@ -42,6 +42,8 @@ pub struct ContextConfiguration {
pub is_opaque: bool, pub is_opaque: bool,
} }
// FIXME: https://github.com/servo/servo/issues/34591
#[expect(clippy::large_enum_variant)]
#[derive(Debug, Deserialize, Serialize)] #[derive(Debug, Deserialize, Serialize)]
pub enum WebGPURequest { pub enum WebGPURequest {
BufferMapAsync { BufferMapAsync {

View file

@ -3,7 +3,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use std::io::Write; use std::io::Write;
use std::panic::PanicInfo; use std::panic::PanicHookInfo;
use std::{env, thread}; use std::{env, thread};
use log::{error, warn}; use log::{error, warn};
@ -11,7 +11,7 @@ use servo::config::opts;
use crate::crash_handler::raise_signal_or_exit_with_error; use crate::crash_handler::raise_signal_or_exit_with_error;
pub(crate) fn panic_hook(info: &PanicInfo) { pub(crate) fn panic_hook(info: &PanicHookInfo) {
warn!("Panic hook called."); warn!("Panic hook called.");
let msg = match info.payload().downcast_ref::<&'static str>() { let msg = match info.payload().downcast_ref::<&'static str>() {
Some(s) => *s, Some(s) => *s,

View file

@ -1,6 +1,6 @@
[toolchain] [toolchain]
# Be sure to update shell.nix and support/crown/rust-toolchain.toml when bumping this! # Be sure to update shell.nix and support/crown/rust-toolchain.toml when bumping this!
channel = "1.81.0" channel = "1.82.0"
components = [ components = [
"clippy", "clippy",

View file

@ -1,5 +1,5 @@
[toolchain] [toolchain]
channel = "1.81.0" channel = "1.82.0"
components = [ components = [
"clippy", "clippy",