#![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",
#![feature(staged_api)]
#![feature(test)]
#![feature(unicode)]
-#![feature(vec_push_all)]
extern crate arena;
extern crate getopts;
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;
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;
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,
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)
// 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");