Add #[must_use] to core and std constructors
This commit is contained in:
parent
6928fafe06
commit
5b5c12be1c
21 changed files with 36 additions and 0 deletions
|
@ -171,6 +171,7 @@ impl<T: Eq> Eq for SyncOnceCell<T> {}
|
|||
impl<T> SyncOnceCell<T> {
|
||||
/// Creates a new empty cell.
|
||||
#[unstable(feature = "once_cell", issue = "74465")]
|
||||
#[must_use]
|
||||
pub const fn new() -> SyncOnceCell<T> {
|
||||
SyncOnceCell {
|
||||
once: Once::new(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue