forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
#[inline(always)]
on trivial UnsafeCell methods
UnsafeCell is the standard building block for shared mutable data structures. UnsafeCell should add zero overhead compared to using raw pointers directly. Some reports suggest that debug builds, or even builds at opt-level 1, may not always be inlining its methods. Mark the methods as `#[inline(always)]`, since once inlined the methods should result in no actual code other than field accesses.
- Loading branch information
1 parent
5b0ab79
commit 37498a1
Showing
1 changed file
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters