mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Opt-in rather than opt-out to unsafe blocks in layout.
This commit is contained in:
parent
a819b0b1b6
commit
7c6b03abfe
12 changed files with 22 additions and 0 deletions
|
@ -95,6 +95,7 @@ impl Drop for Scope {
|
|||
/// Generate a unique ID. This is used for items such as Fragment
|
||||
/// which are often reallocated but represent essentially the
|
||||
/// same data.
|
||||
#[allow(unsafe_blocks)]
|
||||
pub fn generate_unique_debug_id() -> u16 {
|
||||
unsafe { DEBUG_ID_COUNTER.fetch_add(1, Ordering::SeqCst) as u16 }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue