]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #48005 - panicbit:env_unimpl_send_sync, r=alexcrichton
authorkennytm <kennytm@gmail.com>
Wed, 14 Feb 2018 08:14:30 +0000 (16:14 +0800)
committerGitHub <noreply@github.com>
Wed, 14 Feb 2018 08:14:30 +0000 (16:14 +0800)
Unimplement Send/Sync for ::env::{Args,ArgsOs,Vars,VarsOs}

Fixes #48004

src/libstd/env.rs

index 27bf326631fb0416cf74082a6315bbf931e46a75..c4946b6b2824d3eed6e6d20567e2fa195ff2c511 100644 (file)
@@ -723,6 +723,12 @@ pub fn args_os() -> ArgsOs {
     ArgsOs { inner: sys::args::args() }
 }
 
+#[stable(feature = "env_unimpl_send_sync", since = "1.25.0")]
+impl !Send for Args {}
+
+#[stable(feature = "env_unimpl_send_sync", since = "1.25.0")]
+impl !Sync for Args {}
+
 #[stable(feature = "env", since = "1.0.0")]
 impl Iterator for Args {
     type Item = String;
@@ -754,6 +760,12 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
     }
 }
 
+#[stable(feature = "env_unimpl_send_sync", since = "1.25.0")]
+impl !Send for ArgsOs {}
+
+#[stable(feature = "env_unimpl_send_sync", since = "1.25.0")]
+impl !Sync for ArgsOs {}
+
 #[stable(feature = "env", since = "1.0.0")]
 impl Iterator for ArgsOs {
     type Item = OsString;