Mark Once::new as #[inline].
Without this, it was not inlined in SyncOnceCell::into_inner(), causing unecessary checks and dead code.
This commit is contained in:
parent
8a261a2b34
commit
aa68aaa8e1
@ -191,6 +191,7 @@ struct WaiterQueue<'a> {
|
||||
|
||||
impl Once {
|
||||
/// Creates a new `Once` value.
|
||||
#[inline]
|
||||
#[stable(feature = "once_new", since = "1.2.0")]
|
||||
#[rustc_const_stable(feature = "const_once_new", since = "1.32.0")]
|
||||
pub const fn new() -> Once {
|
||||
|
Loading…
Reference in New Issue
Block a user