about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-11-25 16:08:01 +0000
committerbors <bors@rust-lang.org>2018-11-25 16:08:01 +0000
commit5bd451b26580de465d59ed5389209ed191b7dbdd (patch)
treedc2e1499910466e79efee5f35d7e60fd578d4d1b /src/libstd
parente9bca7a993d740291568c57eeef797b175c591cf (diff)
parentcd17b1d4b684df5fb04d0ee08342446463d20b18 (diff)
downloadrust-5bd451b26580de465d59ed5389209ed191b7dbdd.tar.gz
rust-5bd451b26580de465d59ed5389209ed191b7dbdd.zip
Auto merge of #56215 - pietroalbini:rollup, r=pietroalbini
Rollup of 14 pull requests

Successful merges:

 - #56024 (Don't auto-inline const functions)
 - #56045 (Check arg/ret sizedness at ExprKind::Path)
 - #56072 (Stabilize macro_literal_matcher)
 - #56075 (Encode a custom "producers" section in wasm files)
 - #56100 (generator fields are not necessarily initialized)
 - #56101 (Incorporate `dyn` into more comments and docs.)
 - #56144 (Fix BTreeSet and BTreeMap gdb pretty-printers)
 - #56151 (Move a flaky process test out of libstd)
 - #56170 (Fix self profiler ICE on Windows)
 - #56176 (Panic setup msg)
 - #56204 (Suggest correct enum variant on typo)
 - #56207 (Stabilize the int_to_from_bytes feature)
 - #56210 (read_c_str should call the AllocationExtra hooks)
 - #56211 ([master] Forward-ports from beta)

Failed merges:

r? @ghost
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/fs.rs4
-rw-r--r--src/libstd/process.rs36
2 files changed, 2 insertions, 38 deletions
diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs
index f4703dec187..92678dd5ced 100644
--- a/src/libstd/fs.rs
+++ b/src/libstd/fs.rs
@@ -256,7 +256,7 @@ fn initial_buffer_size(file: &File) -> usize {
 /// use std::fs;
 /// use std::net::SocketAddr;
 ///
-/// fn main() -> Result<(), Box<std::error::Error + 'static>> {
+/// fn main() -> Result<(), Box<dyn std::error::Error + 'static>> {
 ///     let foo: SocketAddr = String::from_utf8_lossy(&fs::read("address.txt")?).parse()?;
 ///     Ok(())
 /// }
@@ -298,7 +298,7 @@ pub fn read<P: AsRef<Path>>(path: P) -> io::Result<Vec<u8>> {
 /// use std::fs;
 /// use std::net::SocketAddr;
 ///
-/// fn main() -> Result<(), Box<std::error::Error + 'static>> {
+/// fn main() -> Result<(), Box<dyn std::error::Error + 'static>> {
 ///     let foo: SocketAddr = fs::read_to_string("address.txt")?.parse()?;
 ///     Ok(())
 /// }
diff --git a/src/libstd/process.rs b/src/libstd/process.rs
index 51481e129df..2d0848252be 100644
--- a/src/libstd/process.rs
+++ b/src/libstd/process.rs
@@ -1890,42 +1890,6 @@ mod tests {
     }
 
     #[test]
-    fn test_inherit_env() {
-        use env;
-
-        let result = env_cmd().output().unwrap();
-        let output = String::from_utf8(result.stdout).unwrap();
-
-        for (ref k, ref v) in env::vars() {
-            // Don't check android RANDOM variable which seems to change
-            // whenever the shell runs, and our `env_cmd` is indeed running a
-            // shell which means it'll get a different RANDOM than we probably
-            // have.
-            //
-            // Also skip env vars with `-` in the name on android because, well,
-            // I'm not sure. It appears though that the `set` command above does
-            // not print env vars with `-` in the name, so we just skip them
-            // here as we won't find them in the output. Note that most env vars
-            // use `_` instead of `-`, but our build system sets a few env vars
-            // with `-` in the name.
-            if cfg!(target_os = "android") &&
-               (*k == "RANDOM" || k.contains("-")) {
-                continue
-            }
-
-            // Windows has hidden environment variables whose names start with
-            // equals signs (`=`). Those do not show up in the output of the
-            // `set` command.
-            assert!((cfg!(windows) && k.starts_with("=")) ||
-                    k.starts_with("DYLD") ||
-                    output.contains(&format!("{}={}", *k, *v)) ||
-                    output.contains(&format!("{}='{}'", *k, *v)),
-                    "output doesn't contain `{}={}`\n{}",
-                    k, v, output);
-        }
-    }
-
-    #[test]
     fn test_override_env() {
         use env;