about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMark Rousskov <mark.simulacrum@gmail.com>2019-08-10 17:16:01 -0400
committerMark Rousskov <mark.simulacrum@gmail.com>2019-08-11 10:36:46 -0400
commitade8b02828de9653e6aca122f1a0f6d8c48ad29b (patch)
treeaed327f53689f783eaab250effeb5218ff3c1c2c /src
parenteea2f879afbaad07c562ba572482f402bc6c0006 (diff)
downloadrust-ade8b02828de9653e6aca122f1a0f6d8c48ad29b.tar.gz
rust-ade8b02828de9653e6aca122f1a0f6d8c48ad29b.zip
Remove unnecessary channel
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/lib.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs
index e63a76614bc..e30b35937db 100644
--- a/src/librustdoc/lib.rs
+++ b/src/librustdoc/lib.rs
@@ -44,7 +44,6 @@ use std::default::Default;
 use std::env;
 use std::panic;
 use std::process;
-use std::sync::mpsc::channel;
 
 use rustc::session::{early_warn, early_error};
 use rustc::session::config::{ErrorOutputType, RustcOptGroup};
@@ -452,8 +451,6 @@ where R: 'static + Send,
     // First, parse the crate and extract all relevant information.
     info!("starting to run rustc");
 
-    let (tx, rx) = channel();
-
     let result = rustc_driver::report_ices_to_stderr_if_any(move || {
         let crate_name = options.crate_name.clone();
         let crate_version = options.crate_version.clone();
@@ -467,15 +464,15 @@ where R: 'static + Send,
 
         krate.version = crate_version;
 
-        tx.send(f(Output {
+        f(Output {
             krate: krate,
             renderinfo: renderinfo,
             renderopts,
-        })).unwrap();
+        })
     });
 
     match result {
-        Ok(()) => rx.recv().unwrap(),
+        Ok(output) => output,
         Err(_) => panic::resume_unwind(Box::new(errors::FatalErrorMarker)),
     }
 }