From 270f0aafed48aa5abd3b9ab56f55af28c582a781 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Wed, 8 Jul 2015 11:28:49 +0200 Subject: [PATCH] Reduce the scope of the allowed unsafe code in context.rs. Since I made unsafe code opt-in in layout, the unsafe code in this module has been reduced to a single unsafe impl, so there is no reason to allow it in the entire module. --- components/layout/context.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/layout/context.rs b/components/layout/context.rs index bf560ff6cc0..353d37d9d0c 100644 --- a/components/layout/context.rs +++ b/components/layout/context.rs @@ -4,7 +4,7 @@ //! Data needed by the layout task. -#![allow(unsafe_code)] +#![deny(unsafe_code)] use css::matching::{ApplicableDeclarationsCache, StyleSharingCandidateCache}; @@ -138,6 +138,7 @@ pub struct SharedLayoutContext { // XXX UNSOUND!!! for stylist // XXX UNSOUND!!! for new_animations_sender // XXX UNSOUND!!! for canvas_layers_sender +#[allow(unsafe_code)] unsafe impl Sync for SharedLayoutContext {} pub struct LayoutContext<'a> {