1
Fork 0

Add #[must_use] to as_type conversions

This commit is contained in:
John Kugelman 2021-10-11 13:57:38 -04:00
parent 86d6d2b738
commit 06e625f7d5
19 changed files with 54 additions and 0 deletions

View file

@ -1031,6 +1031,7 @@ impl ThreadId {
/// value is entirely opaque -- only equality testing is stable. Note that
/// it is not guaranteed which values new threads will return, and this may
/// change across Rust versions.
#[must_use]
#[unstable(feature = "thread_id_value", issue = "67939")]
pub fn as_u64(&self) -> NonZeroU64 {
self.0