diff options
-rw-r--r-- | components/background_hang_monitor/sampler.rs | 5 | ||||
-rw-r--r-- | components/constellation/sandboxing.rs | 1 | ||||
-rw-r--r-- | components/gfx/font.rs | 1 | ||||
-rw-r--r-- | components/gfx/platform/mod.rs | 3 |
4 files changed, 10 insertions, 0 deletions
diff --git a/components/background_hang_monitor/sampler.rs b/components/background_hang_monitor/sampler.rs index 9c67908c463..e99572b2d2b 100644 --- a/components/background_hang_monitor/sampler.rs +++ b/components/background_hang_monitor/sampler.rs @@ -43,13 +43,17 @@ pub struct Registers { pub frame_ptr: Address, } +#[allow(dead_code)] pub struct NativeStack { instruction_ptrs: [*mut std::ffi::c_void; MAX_NATIVE_FRAMES], + #[allow(dead_code)] stack_ptrs: [*mut std::ffi::c_void; MAX_NATIVE_FRAMES], + #[allow(dead_code)] count: usize, } impl NativeStack { + #[allow(dead_code)] pub fn new() -> Self { NativeStack { instruction_ptrs: [ptr::null_mut(); MAX_NATIVE_FRAMES], @@ -58,6 +62,7 @@ impl NativeStack { } } + #[allow(dead_code)] pub fn process_register( &mut self, instruction_ptr: *mut std::ffi::c_void, diff --git a/components/constellation/sandboxing.rs b/components/constellation/sandboxing.rs index c8cbb651ee8..458659ad8fd 100644 --- a/components/constellation/sandboxing.rs +++ b/components/constellation/sandboxing.rs @@ -243,6 +243,7 @@ fn setup_common<C: CommandMethods>(command: &mut C, token: String) { } /// A trait to unify commands launched as multiprocess with or without a sandbox. +#[allow(dead_code)] trait CommandMethods { /// A command line argument. fn arg<T>(&mut self, arg: T) diff --git a/components/gfx/font.rs b/components/gfx/font.rs index 1ea59c73fd5..89553b80990 100644 --- a/components/gfx/font.rs +++ b/components/gfx/font.rs @@ -831,6 +831,7 @@ impl FontFamilyDescriptor { /// ]; /// let mapped_weight = apply_font_config_to_style_mapping(&mapping, weight as f64); /// ``` +#[cfg(any(target_os = "linux", target_os = "macos"))] pub(crate) fn map_platform_values_to_style_values(mapping: &[(f64, f64)], value: f64) -> f64 { if value < mapping[0].0 { return mapping[0].1; diff --git a/components/gfx/platform/mod.rs b/components/gfx/platform/mod.rs index f445d83e75c..542c6ab0aed 100644 --- a/components/gfx/platform/mod.rs +++ b/components/gfx/platform/mod.rs @@ -2,7 +2,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +#[cfg(any(target_os = "linux", target_os = "macos"))] use base::text::{UnicodeBlock, UnicodeBlockMethod}; +#[cfg(any(target_os = "linux", target_os = "macos"))] use unicode_script::Script; #[cfg(any(target_os = "linux", target_os = "android"))] @@ -11,6 +13,7 @@ pub use crate::platform::freetype::{font, font_list, library_handle}; pub use crate::platform::macos::{core_text_font_cache, font, font_list}; #[cfg(target_os = "windows")] pub use crate::platform::windows::{font, font_list}; +#[cfg(any(target_os = "linux", target_os = "macos"))] use crate::text::FallbackFontSelectionOptions; #[cfg(any(target_os = "linux", target_os = "android"))] |