]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/lib.rs
Auto merge of #30457 - Manishearth:rollup, r=Manishearth
[rust.git] / src / librustdoc / lib.rs
index 9afe573936db5ab369a098629600c5ec5e8f6432..31fdc1170c0261f54dc285cba4ff162f0d27eb58 100644 (file)
@@ -31,7 +31,6 @@
 #![feature(staged_api)]
 #![feature(test)]
 #![feature(unicode)]
-#![feature(vec_push_all)]
 
 extern crate arena;
 extern crate getopts;
@@ -43,6 +42,7 @@
 extern crate rustc_lint;
 extern crate rustc_back;
 extern crate rustc_front;
+extern crate rustc_metadata;
 extern crate serialize;
 extern crate syntax;
 extern crate test as testing;
@@ -65,7 +65,7 @@
 use serialize::Decodable;
 use serialize::json::{self, Json};
 use rustc::session::search_paths::SearchPaths;
-use syntax::diagnostic;
+use syntax::errors::emitter::ColorConfig;
 
 // reexported from `clean` so it can be easily updated with the mod itself
 pub use clean::SCHEMA_VERSION;
@@ -228,7 +228,7 @@ pub fn main_args(args: &[String]) -> isize {
 
     let mut libs = SearchPaths::new();
     for s in &matches.opt_strs("L") {
-        libs.add_path(s, diagnostic::Auto);
+        libs.add_path(s, ColorConfig::Auto);
     }
     let externs = match parse_externs(&matches) {
         Ok(ex) => ex,
@@ -261,7 +261,7 @@ pub fn main_args(args: &[String]) -> isize {
 
     match (should_test, markdown_input) {
         (true, true) => {
-            return markdown::test(input, libs, externs, test_args)
+            return markdown::test(input, cfgs, libs, externs, test_args)
         }
         (true, false) => {
             return test::run(input, cfgs, libs, externs, test_args, crate_name)
@@ -363,7 +363,7 @@ fn rust_input(cratefile: &str, externs: core::Externs, matches: &getopts::Matche
     // First, parse the crate and extract all relevant information.
     let mut paths = SearchPaths::new();
     for s in &matches.opt_strs("L") {
-        paths.add_path(s, diagnostic::Auto);
+        paths.add_path(s, ColorConfig::Auto);
     }
     let cfgs = matches.opt_strs("cfg");
     let triple = matches.opt_str("target");