Skip to content

Commit 1abd0d8

Browse files
committed
#[allow(unused_)] on some platforms
1 parent 541bd2c commit 1abd0d8

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/libstd/net/tcp.rs

+1
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,7 @@ impl TcpListener {
729729
/// ```
730730
#[stable(feature = "rust1", since = "1.0.0")]
731731
pub fn accept(&self) -> io::Result<(TcpStream, SocketAddr)> {
732+
#[allow(unused_variables)] // `TcpStream` is uninhabited on some platforms.
732733
self.0.accept().map(|(a, b)| (TcpStream(a), b))
733734
}
734735

src/libstd/sys_common/process.rs

+2
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ impl<K: EnvKey> CommandEnv<K> {
6666
pub fn capture(&self) -> BTreeMap<K, OsString> {
6767
let mut result = BTreeMap::<K, OsString>::new();
6868
if !self.clear {
69+
#[allow(unused_mut)] // `Env` is uninhabited on some platforms.
6970
for (k, v) in env::vars_os() {
7071
result.insert(k.into(), v);
7172
}
@@ -83,6 +84,7 @@ impl<K: EnvKey> CommandEnv<K> {
8384
// Apply these changes directly to the current environment
8485
pub fn apply(&self) {
8586
if self.clear {
87+
#[allow(unused_mut)] // `Env` is uninhabited on some platforms.
8688
for (k, _) in env::vars_os() {
8789
env::remove_var(k);
8890
}

0 commit comments

Comments
 (0)