From f99c810bec362421300e1fc2d6798643a07bb8d1 Mon Sep 17 00:00:00 2001 From: daxpedda Date: Sat, 6 Jan 2024 16:54:29 +0100 Subject: [PATCH] ci: Fix dead code error on nightly See https://github.com/rust-lang/rust/pull/118297 --- src/platform_impl/linux/x11/ime/callbacks.rs | 6 +++--- src/platform_impl/linux/x11/ime/input_method.rs | 6 +++--- src/platform_impl/linux/x11/ime/mod.rs | 2 +- src/platform_impl/web/main_thread.rs | 2 +- src/platform_impl/windows/window.rs | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/platform_impl/linux/x11/ime/callbacks.rs b/src/platform_impl/linux/x11/ime/callbacks.rs index b5a010714c..02e26410a6 100644 --- a/src/platform_impl/linux/x11/ime/callbacks.rs +++ b/src/platform_impl/linux/x11/ime/callbacks.rs @@ -79,9 +79,9 @@ pub(crate) unsafe fn set_destroy_callback( #[allow(clippy::enum_variant_names)] enum ReplaceImError { // Boxed to prevent large error type - MethodOpenFailed(Box), - ContextCreationFailed(ImeContextCreationError), - SetDestroyCallbackFailed(XError), + MethodOpenFailed(#[allow(dead_code)] Box), + ContextCreationFailed(#[allow(dead_code)] ImeContextCreationError), + SetDestroyCallbackFailed(#[allow(dead_code)] XError), } // Attempt to replace current IM (which may or may not be presently valid) with a new one. This diff --git a/src/platform_impl/linux/x11/ime/input_method.rs b/src/platform_impl/linux/x11/ime/input_method.rs index 30a4a3eb42..faad41effb 100644 --- a/src/platform_impl/linux/x11/ime/input_method.rs +++ b/src/platform_impl/linux/x11/ime/input_method.rs @@ -159,9 +159,9 @@ impl InputMethodResult { #[derive(Debug, Clone)] enum GetXimServersError { - XError(XError), - GetPropertyError(util::GetPropertyError), - InvalidUtf8(IntoStringError), + XError(#[allow(dead_code)] XError), + GetPropertyError(#[allow(dead_code)] util::GetPropertyError), + InvalidUtf8(#[allow(dead_code)] IntoStringError), } impl From for GetXimServersError { diff --git a/src/platform_impl/linux/x11/ime/mod.rs b/src/platform_impl/linux/x11/ime/mod.rs index becc9dd37f..37b290d344 100644 --- a/src/platform_impl/linux/x11/ime/mod.rs +++ b/src/platform_impl/linux/x11/ime/mod.rs @@ -52,7 +52,7 @@ pub enum ImeRequest { pub(crate) enum ImeCreationError { // Boxed to prevent large error type OpenFailure(Box), - SetDestroyCallbackFailed(XError), + SetDestroyCallbackFailed(#[allow(dead_code)] XError), } pub(crate) struct Ime { diff --git a/src/platform_impl/web/main_thread.rs b/src/platform_impl/web/main_thread.rs index 8c8598f476..140a1e9e17 100644 --- a/src/platform_impl/web/main_thread.rs +++ b/src/platform_impl/web/main_thread.rs @@ -87,7 +87,7 @@ unsafe impl Sync for MainThreadSafe {} static DROP_HANDLER: OnceLock> = OnceLock::new(); -struct DropBox(Box); +struct DropBox(#[allow(dead_code)] Box); unsafe impl Send for DropBox {} unsafe impl Sync for DropBox {} diff --git a/src/platform_impl/windows/window.rs b/src/platform_impl/windows/window.rs index 44332f35b9..f383abcc3a 100644 --- a/src/platform_impl/windows/window.rs +++ b/src/platform_impl/windows/window.rs @@ -1398,7 +1398,7 @@ unsafe fn register_window_class(class_name: &[u16]) { unsafe { RegisterClassExW(&class) }; } -struct ComInitialized(*mut ()); +struct ComInitialized(#[allow(dead_code)] *mut ()); impl Drop for ComInitialized { fn drop(&mut self) { unsafe { CoUninitialize() };