]> 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 b311ddc4f4515cd1a73bd4010cddda6f7cf48e96..31fdc1170c0261f54dc285cba4ff162f0d27eb58 100644 (file)
@@ -12,7 +12,7 @@
 #![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustdoc"]
 #![unstable(feature = "rustdoc", issue = "27812")]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
@@ -24,7 +24,6 @@
 #![feature(box_syntax)]
 #![feature(dynamic_lib)]
 #![feature(libc)]
-#![feature(path_ext)]
 #![feature(path_relative_from)]
 #![feature(rustc_private)]
 #![feature(set_stdio)]
@@ -32,7 +31,6 @@
 #![feature(staged_api)]
 #![feature(test)]
 #![feature(unicode)]
-#![feature(vec_push_all)]
 
 extern crate arena;
 extern crate getopts;
@@ -44,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;
@@ -66,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;
@@ -229,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,
@@ -262,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)
@@ -364,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");