mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
clippy: Fix warnings in shared
and config
, fonts
, layout
, and layout_2020
components (#32674)
This commit is contained in:
parent
99c1f886b8
commit
4b63043c6a
20 changed files with 72 additions and 78 deletions
|
@ -74,8 +74,11 @@ use crate::table_wrapper::TableWrapperFlow;
|
|||
/// This marker trait indicates that a type is a struct with `#[repr(C)]` whose first field
|
||||
/// is of type `BaseFlow` or some type that also implements this trait.
|
||||
///
|
||||
/// In other words, the memory representation of `BaseFlow` must be a prefix
|
||||
/// of the memory representation of types implementing `HasBaseFlow`.
|
||||
/// # Safety
|
||||
///
|
||||
/// The memory representation of `BaseFlow` must be a prefix of the memory representation of types
|
||||
/// implementing `HasBaseFlow`. If this isn't the case, calling [`GetBaseFlow::base`] or
|
||||
/// [`GetBaseFlow::mut_base`] could lead to memory errors.
|
||||
#[allow(unsafe_code)]
|
||||
pub unsafe trait HasBaseFlow {}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue