diff options
Diffstat (limited to 'src/librustdoc/lib.rs')
-rw-r--r-- | src/librustdoc/lib.rs | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index 67f5ea5d9..dda06d4c9 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -74,6 +74,7 @@ extern crate jemalloc_sys; use std::env::{self, VarError}; use std::io::{self, IsTerminal}; use std::process; +use std::sync::{atomic::AtomicBool, Arc}; use rustc_driver::abort_on_err; use rustc_errors::ErrorGuaranteed; @@ -157,7 +158,7 @@ pub fn main() { let mut handler = EarlyErrorHandler::new(ErrorOutputType::default()); - rustc_driver::install_ice_hook( + let using_internal_features = rustc_driver::install_ice_hook( "https://github.com/rust-lang/rust/issues/new\ ?labels=C-bug%2C+I-ICE%2C+T-rustdoc&template=ice.md", |_| (), @@ -177,7 +178,7 @@ pub fn main() { rustc_driver::init_env_logger(&handler, "RUSTDOC_LOG"); let exit_code = rustc_driver::catch_with_exit_code(|| match get_args(&handler) { - Some(args) => main_args(&mut handler, &args), + Some(args) => main_args(&mut handler, &args, using_internal_features), _ => { #[allow(deprecated)] @@ -701,7 +702,11 @@ fn run_renderer<'tcx, T: formats::FormatRenderer<'tcx>>( } } -fn main_args(handler: &mut EarlyErrorHandler, at_args: &[String]) -> MainResult { +fn main_args( + handler: &mut EarlyErrorHandler, + at_args: &[String], + using_internal_features: Arc<AtomicBool>, +) -> MainResult { // Throw away the first argument, the name of the binary. // In case of at_args being empty, as might be the case by // passing empty argument array to execve under some platforms, @@ -752,7 +757,7 @@ fn main_args(handler: &mut EarlyErrorHandler, at_args: &[String]) -> MainResult (false, true) => { let input = options.input.clone(); let edition = options.edition; - let config = core::create_config(handler, options, &render_options); + let config = core::create_config(options, &render_options, using_internal_features); // `markdown::render` can invoke `doctest::make_test`, which // requires session globals and a thread pool, so we use @@ -785,7 +790,7 @@ fn main_args(handler: &mut EarlyErrorHandler, at_args: &[String]) -> MainResult let scrape_examples_options = options.scrape_examples_options.clone(); let bin_crate = options.bin_crate; - let config = core::create_config(handler, options, &render_options); + let config = core::create_config(options, &render_options, using_internal_features); interface::run_compiler(config, |compiler| { let sess = compiler.session(); |