Introduce an unsafe HasBaseFlow trait for base()/base_mut() casts.

This commit is contained in:
Simon Sapin 2017-10-14 00:03:57 +02:00
parent 4c5d6fd834
commit b505c9e948
13 changed files with 63 additions and 3 deletions

View file

@ -492,8 +492,12 @@ pub enum FormattingContextType {
Other,
}
#[allow(unsafe_code)]
unsafe impl ::flow::HasBaseFlow for BlockFlow {}
// A block formatting context.
#[derive(Serialize)]
#[repr(C)]
pub struct BlockFlow {
/// Data common to all flows.
pub base: BaseFlow,