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
1 changed files with 1 additions and 0 deletions
|
@ -191,6 +191,7 @@ struct WaiterQueue<'a> {
|
||||||
|
|
||||||
impl Once {
|
impl Once {
|
||||||
/// Creates a new `Once` value.
|
/// Creates a new `Once` value.
|
||||||
|
#[inline]
|
||||||
#[stable(feature = "once_new", since = "1.2.0")]
|
#[stable(feature = "once_new", since = "1.2.0")]
|
||||||
#[rustc_const_stable(feature = "const_once_new", since = "1.32.0")]
|
#[rustc_const_stable(feature = "const_once_new", since = "1.32.0")]
|
||||||
pub const fn new() -> Once {
|
pub const fn new() -> Once {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue