about summary refs log tree commit diff
path: root/library/std/src/os/unix/net/addr.rs
diff options
context:
space:
mode:
authorthe8472 <the8472@users.noreply.github.com>2021-10-12 14:53:11 +0200
committerGitHub <noreply@github.com>2021-10-12 14:53:11 +0200
commit4cf0f1feded6f511d226cb4ed43004a2d8e8c1fa (patch)
tree80eb976333e734650d512cebab9000a0b04cb451 /library/std/src/os/unix/net/addr.rs
parenta1bdd48106cdb3f9888a564aaa6aa0daef843d64 (diff)
parent01b439e764617c715787c3ba629c83c77c191db0 (diff)
downloadrust-4cf0f1feded6f511d226cb4ed43004a2d8e8c1fa.tar.gz
rust-4cf0f1feded6f511d226cb4ed43004a2d8e8c1fa.zip
Rollup merge of #89797 - jkugelman:must-use-is_condition-tests, r=joshtriplett
Add #[must_use] to is_condition tests

I threw in `std::path::Path::has_root` for funsies.

A continuation of #89718.

Parent issue: #89692

r? ```@joshtriplett```
Diffstat (limited to 'library/std/src/os/unix/net/addr.rs')
-rw-r--r--library/std/src/os/unix/net/addr.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/std/src/os/unix/net/addr.rs b/library/std/src/os/unix/net/addr.rs
index d741096893a..c9ccc26f4e1 100644
--- a/library/std/src/os/unix/net/addr.rs
+++ b/library/std/src/os/unix/net/addr.rs
@@ -156,6 +156,7 @@ impl SocketAddr {
     ///     Ok(())
     /// }
     /// ```
+    #[must_use]
     #[stable(feature = "unix_socket", since = "1.10.0")]
     pub fn is_unnamed(&self) -> bool {
         if let AddressKind::Unnamed = self.address() { true } else { false }