aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx/text
diff options
context:
space:
mode:
authorMs2ger <Ms2ger@gmail.com>2016-06-05 12:30:34 +0200
committerMs2ger <Ms2ger@gmail.com>2016-06-05 12:31:55 +0200
commitdb5ddb561cb821ac89c8cc1002cdbddfd98400fa (patch)
tree32cfbe0f5b4bc8410679901986f69acc66d27935 /components/gfx/text
parent75ea39c7098f2ceec640d62b49b2026c7683021d (diff)
downloadservo-db5ddb561cb821ac89c8cc1002cdbddfd98400fa.tar.gz
servo-db5ddb561cb821ac89c8cc1002cdbddfd98400fa.zip
Reduce the scope of the allowed unsafe code in gfx::text.
Diffstat (limited to 'components/gfx/text')
-rw-r--r--components/gfx/text/glyph.rs1
-rw-r--r--components/gfx/text/shaping/harfbuzz.rs2
2 files changed, 3 insertions, 0 deletions
diff --git a/components/gfx/text/glyph.rs b/components/gfx/text/glyph.rs
index a41202eb3a2..fe9dc415625 100644
--- a/components/gfx/text/glyph.rs
+++ b/components/gfx/text/glyph.rs
@@ -627,6 +627,7 @@ impl<'a> GlyphStore {
/// Used for SIMD.
#[inline]
#[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]
+ #[allow(unsafe_code)]
fn transmute_entry_buffer_to_u32_buffer(&self) -> &[u32] {
unsafe { mem::transmute(self.entry_buffer.as_slice()) }
}
diff --git a/components/gfx/text/shaping/harfbuzz.rs b/components/gfx/text/shaping/harfbuzz.rs
index 5e6b025e21c..5106418be61 100644
--- a/components/gfx/text/shaping/harfbuzz.rs
+++ b/components/gfx/text/shaping/harfbuzz.rs
@@ -2,6 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+#![allow(unsafe_code)]
+
use app_units::Au;
use euclid::Point2D;
use font::{DISABLE_KERNING_SHAPING_FLAG, Font, FontTableMethods, FontTableTag};