diff options
author | Ms2ger <ms2ger@gmail.com> | 2015-02-08 20:03:17 +0100 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2015-02-08 20:03:27 +0100 |
commit | 7c6b03abfeaf97950ee6a9ff8316a9277a5cf069 (patch) | |
tree | 743327332930fd9d525c4609022f9798467a395c /components/layout/flow.rs | |
parent | a819b0b1b609d94e2b7d5a352f1c0d8592874a3c (diff) | |
download | servo-7c6b03abfeaf97950ee6a9ff8316a9277a5cf069.tar.gz servo-7c6b03abfeaf97950ee6a9ff8316a9277a5cf069.zip |
Opt-in rather than opt-out to unsafe blocks in layout.
Diffstat (limited to 'components/layout/flow.rs')
-rw-r--r-- | components/layout/flow.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/components/layout/flow.rs b/components/layout/flow.rs index 9ca0446b9c4..cb1658879cd 100644 --- a/components/layout/flow.rs +++ b/components/layout/flow.rs @@ -294,6 +294,7 @@ pub trait Flow: fmt::Show + Sync { } /// Returns a layer ID for the given fragment. + #[allow(unsafe_blocks)] fn layer_id(&self, fragment_id: uint) -> LayerId { unsafe { let obj = mem::transmute::<&&Self, &raw::TraitObject>(&self); @@ -310,6 +311,7 @@ pub trait Flow: fmt::Show + Sync { // Base access #[inline(always)] +#[allow(unsafe_blocks)] pub fn base<'a, T: ?Sized + Flow>(this: &'a T) -> &'a BaseFlow { unsafe { let obj = mem::transmute::<&&'a T, &'a raw::TraitObject>(&this); @@ -323,6 +325,7 @@ pub fn imm_child_iter<'a>(flow: &'a Flow) -> FlowListIterator<'a> { } #[inline(always)] +#[allow(unsafe_blocks)] pub fn mut_base<'a, T: ?Sized + Flow>(this: &'a mut T) -> &'a mut BaseFlow { unsafe { let obj = mem::transmute::<&&'a mut T, &'a raw::TraitObject>(&this); |