about summary refs log tree commit diff
path: root/src/librustc_driver
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2015-01-27 09:38:30 -0800
committerBrian Anderson <banderson@mozilla.com>2015-01-27 15:05:04 -0800
commit71223050538939ed758fcd3b9114f71abff20bb2 (patch)
tree43ddd18223904fa86601f1a0e16ebcbaddead270 /src/librustc_driver
parent3c172392cf0c86ffd1d7b39d3f44de98f77afc44 (diff)
parent777435990e0e91df6b72ce80c9b6fa485eeb5daa (diff)
downloadrust-71223050538939ed758fcd3b9114f71abff20bb2.tar.gz
rust-71223050538939ed758fcd3b9114f71abff20bb2.zip
Merge remote-tracking branch 'rust-lang/master'
Conflicts:
	src/libcore/cell.rs
	src/librustc_driver/test.rs
	src/libstd/old_io/net/tcp.rs
	src/libstd/old_io/process.rs
Diffstat (limited to 'src/librustc_driver')
-rw-r--r--src/librustc_driver/driver.rs10
-rw-r--r--src/librustc_driver/lib.rs16
-rw-r--r--src/librustc_driver/pretty.rs24
-rw-r--r--src/librustc_driver/test.rs4
4 files changed, 27 insertions, 27 deletions
diff --git a/src/librustc_driver/driver.rs b/src/librustc_driver/driver.rs
index 4d5c2b765fe..6e76519ce23 100644
--- a/src/librustc_driver/driver.rs
+++ b/src/librustc_driver/driver.rs
@@ -30,8 +30,8 @@ use rustc_privacy;
 
 use serialize::json;
 
-use std::io;
-use std::io::fs;
+use std::old_io;
+use std::old_io::fs;
 use std::os;
 use syntax::ast;
 use syntax::ast_map;
@@ -100,6 +100,7 @@ pub fn compile_input(sess: Session,
                                                                  &id[]));
 
         let mut forest = ast_map::Forest::new(expanded_crate);
+        let arenas = ty::CtxtArenas::new();
         let ast_map = assign_node_ids_and_map(&sess, &mut forest);
 
         write_out_deps(&sess, input, &outputs, &id[]);
@@ -111,7 +112,6 @@ pub fn compile_input(sess: Session,
                                                                      &ast_map,
                                                                      &id[]));
 
-        let arenas = ty::CtxtArenas::new();
         let analysis = phase_3_run_analysis_passes(sess,
                                                    ast_map,
                                                    &arenas,
@@ -794,14 +794,14 @@ fn write_out_deps(sess: &Session,
         _ => return,
     };
 
-    let result = (|&:| -> io::IoResult<()> {
+    let result = (|&:| -> old_io::IoResult<()> {
         // Build a list of files used to compile the output and
         // write Makefile-compatible dependency rules
         let files: Vec<String> = sess.codemap().files.borrow()
                                    .iter().filter(|fmap| fmap.is_real_file())
                                    .map(|fmap| escape_dep_filename(&fmap.name[]))
                                    .collect();
-        let mut file = try!(io::File::create(&deps_filename));
+        let mut file = try!(old_io::File::create(&deps_filename));
         for path in out_filenames.iter() {
             try!(write!(&mut file as &mut Writer,
                           "{}: {}\n\n", path.display(), files.connect(" ")));
diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs
index ffce577899b..727638c29c3 100644
--- a/src/librustc_driver/lib.rs
+++ b/src/librustc_driver/lib.rs
@@ -73,7 +73,7 @@ use rustc::metadata::creader::CrateOrString::Str;
 use rustc::util::common::time;
 
 use std::cmp::Ordering::Equal;
-use std::io;
+use std::old_io;
 use std::iter::repeat;
 use std::os;
 use std::sync::mpsc::channel;
@@ -142,7 +142,7 @@ fn run_compiler(args: &[String]) {
         1u => {
             let ifile = &matches.free[0][];
             if ifile == "-" {
-                let contents = io::stdin().read_to_end().unwrap();
+                let contents = old_io::stdin().read_to_end().unwrap();
                 let src = String::from_utf8(contents).unwrap();
                 (Input::Str(src), None)
             } else {
@@ -196,7 +196,7 @@ fn run_compiler(args: &[String]) {
     if r.contains(&("ls".to_string())) {
         match input {
             Input::File(ref ifile) => {
-                let mut stdout = io::stdout();
+                let mut stdout = old_io::stdout();
                 list_metadata(&sess, &(*ifile), &mut stdout).unwrap();
             }
             Input::Str(_) => {
@@ -599,7 +599,7 @@ fn parse_crate_attrs(sess: &Session, input: &Input) ->
 }
 
 pub fn list_metadata(sess: &Session, path: &Path,
-                     out: &mut io::Writer) -> io::IoResult<()> {
+                     out: &mut old_io::Writer) -> old_io::IoResult<()> {
     metadata::loader::list_file_metadata(sess.target.target.options.is_like_osx, path, out)
 }
 
@@ -612,8 +612,8 @@ pub fn monitor<F:FnOnce()+Send>(f: F) {
     static STACK_SIZE: uint = 8 * 1024 * 1024; // 8MB
 
     let (tx, rx) = channel();
-    let w = io::ChanWriter::new(tx);
-    let mut r = io::ChanReader::new(rx);
+    let w = old_io::ChanWriter::new(tx);
+    let mut r = old_io::ChanReader::new(rx);
 
     let mut cfg = thread::Builder::new().name("rustc".to_string());
 
@@ -623,7 +623,7 @@ pub fn monitor<F:FnOnce()+Send>(f: F) {
         cfg = cfg.stack_size(STACK_SIZE);
     }
 
-    match cfg.scoped(move || { std::io::stdio::set_stderr(box w); f() }).join() {
+    match cfg.scoped(move || { std::old_io::stdio::set_stderr(box w); f() }).join() {
         Ok(()) => { /* fallthrough */ }
         Err(value) => {
             // Thread panicked without emitting a fatal diagnostic
@@ -665,7 +665,7 @@ pub fn monitor<F:FnOnce()+Send>(f: F) {
             // Panic so the process returns a failure code, but don't pollute the
             // output with some unnecessary panic messages, we've already
             // printed everything that we needed to.
-            io::stdio::set_stderr(box io::util::NullWriter);
+            old_io::stdio::set_stderr(box old_io::util::NullWriter);
             panic!();
         }
     }
diff --git a/src/librustc_driver/pretty.rs b/src/librustc_driver/pretty.rs
index 582e1032324..b09e9f14357 100644
--- a/src/librustc_driver/pretty.rs
+++ b/src/librustc_driver/pretty.rs
@@ -38,7 +38,7 @@ use syntax::ptr::P;
 
 use graphviz as dot;
 
-use std::io::{self, MemReader};
+use std::old_io::{self, MemReader};
 use std::option;
 use std::str::FromStr;
 
@@ -208,7 +208,7 @@ impl<'ast> PrinterSupport<'ast> for IdentifiedAnnotation<'ast> {
 impl<'ast> pprust::PpAnn for IdentifiedAnnotation<'ast> {
     fn pre(&self,
            s: &mut pprust::State,
-           node: pprust::AnnNode) -> io::IoResult<()> {
+           node: pprust::AnnNode) -> old_io::IoResult<()> {
         match node {
             pprust::NodeExpr(_) => s.popen(),
             _ => Ok(())
@@ -216,7 +216,7 @@ impl<'ast> pprust::PpAnn for IdentifiedAnnotation<'ast> {
     }
     fn post(&self,
             s: &mut pprust::State,
-            node: pprust::AnnNode) -> io::IoResult<()> {
+            node: pprust::AnnNode) -> old_io::IoResult<()> {
         match node {
             pprust::NodeIdent(_) | pprust::NodeName(_) => Ok(()),
 
@@ -259,7 +259,7 @@ impl<'ast> PrinterSupport<'ast> for HygieneAnnotation<'ast> {
 impl<'ast> pprust::PpAnn for HygieneAnnotation<'ast> {
     fn post(&self,
             s: &mut pprust::State,
-            node: pprust::AnnNode) -> io::IoResult<()> {
+            node: pprust::AnnNode) -> old_io::IoResult<()> {
         match node {
             pprust::NodeIdent(&ast::Ident { name: ast::Name(nm), ctxt }) => {
                 try!(pp::space(&mut s.s));
@@ -294,7 +294,7 @@ impl<'tcx> PrinterSupport<'tcx> for TypedAnnotation<'tcx> {
 impl<'tcx> pprust::PpAnn for TypedAnnotation<'tcx> {
     fn pre(&self,
            s: &mut pprust::State,
-           node: pprust::AnnNode) -> io::IoResult<()> {
+           node: pprust::AnnNode) -> old_io::IoResult<()> {
         match node {
             pprust::NodeExpr(_) => s.popen(),
             _ => Ok(())
@@ -302,7 +302,7 @@ impl<'tcx> pprust::PpAnn for TypedAnnotation<'tcx> {
     }
     fn post(&self,
             s: &mut pprust::State,
-            node: pprust::AnnNode) -> io::IoResult<()> {
+            node: pprust::AnnNode) -> old_io::IoResult<()> {
         let tcx = &self.analysis.ty_cx;
         match node {
             pprust::NodeExpr(expr) => {
@@ -548,9 +548,9 @@ pub fn pretty_print_input(sess: Session,
     let mut rdr = MemReader::new(src);
 
     let out = match ofile {
-        None => box io::stdout() as Box<Writer+'static>,
+        None => box old_io::stdout() as Box<Writer+'static>,
         Some(p) => {
-            let r = io::File::create(&p);
+            let r = old_io::File::create(&p);
             match r {
                 Ok(w) => box w as Box<Writer+'static>,
                 Err(e) => panic!("print-print failed to open {} due to {}",
@@ -643,11 +643,11 @@ pub fn pretty_print_input(sess: Session,
     }.unwrap()
 }
 
-fn print_flowgraph<W:io::Writer>(variants: Vec<borrowck_dot::Variant>,
+fn print_flowgraph<W:old_io::Writer>(variants: Vec<borrowck_dot::Variant>,
                                  analysis: ty::CrateAnalysis,
                                  code: blocks::Code,
                                  mode: PpFlowGraphMode,
-                                 mut out: W) -> io::IoResult<()> {
+                                 mut out: W) -> old_io::IoResult<()> {
     let ty_cx = &analysis.ty_cx;
     let cfg = match code {
         blocks::BlockCode(block) => cfg::CFG::new(ty_cx, &*block),
@@ -687,11 +687,11 @@ fn print_flowgraph<W:io::Writer>(variants: Vec<borrowck_dot::Variant>,
         }
     }
 
-    fn expand_err_details(r: io::IoResult<()>) -> io::IoResult<()> {
+    fn expand_err_details(r: old_io::IoResult<()>) -> old_io::IoResult<()> {
         r.map_err(|ioerr| {
             let orig_detail = ioerr.detail.clone();
             let m = "graphviz::render failed";
-            io::IoError {
+            old_io::IoError {
                 detail: Some(match orig_detail {
                     None => m.to_string(),
                     Some(d) => format!("{}: {}", m, d)
diff --git a/src/librustc_driver/test.rs b/src/librustc_driver/test.rs
index 3543fe07269..52d7415a523 100644
--- a/src/librustc_driver/test.rs
+++ b/src/librustc_driver/test.rs
@@ -103,7 +103,7 @@ fn test_env<F>(source_string: &str,
     let codemap =
         CodeMap::new();
     let diagnostic_handler =
-        diagnostic::mk_handler(emitter);
+        diagnostic::mk_handler(true, emitter);
     let span_diagnostic_handler =
         diagnostic::mk_span_handler(diagnostic_handler, codemap);
 
@@ -115,6 +115,7 @@ fn test_env<F>(source_string: &str,
                     .expect("phase 2 aborted");
 
     let mut forest = ast_map::Forest::new(krate);
+    let arenas = ty::CtxtArenas::new();
     let ast_map = driver::assign_node_ids_and_map(&sess, &mut forest);
     let krate = ast_map.krate();
 
@@ -125,7 +126,6 @@ fn test_env<F>(source_string: &str,
     let named_region_map = resolve_lifetime::krate(&sess, krate, &def_map);
     let region_map = region::resolve_crate(&sess, krate);
     let stability_index = stability::Index::build(&sess, krate);
-    let arenas = ty::CtxtArenas::new();
     let tcx = ty::mk_ctxt(sess,
                           &arenas,
                           def_map,