1
Fork 0

Add #[must_use] to core and std constructors

This commit is contained in:
John Kugelman 2021-10-10 02:44:26 -04:00
parent 6928fafe06
commit 5b5c12be1c
21 changed files with 36 additions and 0 deletions

View file

@ -121,6 +121,7 @@ impl Condvar {
/// let condvar = Condvar::new();
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[must_use]
pub fn new() -> Condvar {
Condvar { inner: sys::Condvar::new() }
}