Rename debugging_options -> debugging_opts to match rustc
This way the rustdoc field names are the same as the rustc field names.
This commit is contained in:
@@ -83,9 +83,9 @@ pub struct Options {
|
|||||||
/// Codegen options strings to hand to the compiler.
|
/// Codegen options strings to hand to the compiler.
|
||||||
pub codegen_options_strs: Vec<String>,
|
pub codegen_options_strs: Vec<String>,
|
||||||
/// Debugging (`-Z`) options to pass to the compiler.
|
/// Debugging (`-Z`) options to pass to the compiler.
|
||||||
pub debugging_options: DebuggingOptions,
|
pub debugging_opts: DebuggingOptions,
|
||||||
/// Debugging (`-Z`) options strings to pass to the compiler.
|
/// Debugging (`-Z`) options strings to pass to the compiler.
|
||||||
pub debugging_options_strs: Vec<String>,
|
pub debugging_opts_strs: Vec<String>,
|
||||||
/// The target used to compile the crate against.
|
/// The target used to compile the crate against.
|
||||||
pub target: TargetTriple,
|
pub target: TargetTriple,
|
||||||
/// Edition used when reading the crate. Defaults to "2015". Also used by default when
|
/// Edition used when reading the crate. Defaults to "2015". Also used by default when
|
||||||
@@ -318,9 +318,9 @@ impl Options {
|
|||||||
let error_format = config::parse_error_format(&matches, color, json_rendered);
|
let error_format = config::parse_error_format(&matches, color, json_rendered);
|
||||||
|
|
||||||
let codegen_options = build_codegen_options(matches, error_format);
|
let codegen_options = build_codegen_options(matches, error_format);
|
||||||
let debugging_options = build_debugging_options(matches, error_format);
|
let debugging_opts = build_debugging_options(matches, error_format);
|
||||||
|
|
||||||
let diag = new_handler(error_format, None, &debugging_options);
|
let diag = new_handler(error_format, None, &debugging_opts);
|
||||||
|
|
||||||
// check for deprecated options
|
// check for deprecated options
|
||||||
check_deprecated_options(&matches, &diag);
|
check_deprecated_options(&matches, &diag);
|
||||||
@@ -365,7 +365,7 @@ impl Options {
|
|||||||
.iter()
|
.iter()
|
||||||
.map(|s| SearchPath::from_cli_opt(s, error_format))
|
.map(|s| SearchPath::from_cli_opt(s, error_format))
|
||||||
.collect();
|
.collect();
|
||||||
let externs = parse_externs(&matches, &debugging_options, error_format);
|
let externs = parse_externs(&matches, &debugging_opts, error_format);
|
||||||
let extern_html_root_urls = match parse_extern_html_roots(&matches) {
|
let extern_html_root_urls = match parse_extern_html_roots(&matches) {
|
||||||
Ok(ex) => ex,
|
Ok(ex) => ex,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
@@ -546,7 +546,7 @@ impl Options {
|
|||||||
let persist_doctests = matches.opt_str("persist-doctests").map(PathBuf::from);
|
let persist_doctests = matches.opt_str("persist-doctests").map(PathBuf::from);
|
||||||
let test_builder = matches.opt_str("test-builder").map(PathBuf::from);
|
let test_builder = matches.opt_str("test-builder").map(PathBuf::from);
|
||||||
let codegen_options_strs = matches.opt_strs("C");
|
let codegen_options_strs = matches.opt_strs("C");
|
||||||
let debugging_options_strs = matches.opt_strs("Z");
|
let debugging_opts_strs = matches.opt_strs("Z");
|
||||||
let lib_strs = matches.opt_strs("L");
|
let lib_strs = matches.opt_strs("L");
|
||||||
let extern_strs = matches.opt_strs("extern");
|
let extern_strs = matches.opt_strs("extern");
|
||||||
let runtool = matches.opt_str("runtool");
|
let runtool = matches.opt_str("runtool");
|
||||||
@@ -569,8 +569,8 @@ impl Options {
|
|||||||
cfgs,
|
cfgs,
|
||||||
codegen_options,
|
codegen_options,
|
||||||
codegen_options_strs,
|
codegen_options_strs,
|
||||||
debugging_options,
|
debugging_opts,
|
||||||
debugging_options_strs,
|
debugging_opts_strs,
|
||||||
target,
|
target,
|
||||||
edition,
|
edition,
|
||||||
maybe_sysroot,
|
maybe_sysroot,
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ pub fn run_core(
|
|||||||
externs,
|
externs,
|
||||||
mut cfgs,
|
mut cfgs,
|
||||||
codegen_options,
|
codegen_options,
|
||||||
debugging_options,
|
debugging_opts,
|
||||||
target,
|
target,
|
||||||
edition,
|
edition,
|
||||||
maybe_sysroot,
|
maybe_sysroot,
|
||||||
@@ -364,7 +364,7 @@ pub fn run_core(
|
|||||||
target_triple: target,
|
target_triple: target,
|
||||||
unstable_features: UnstableFeatures::from_environment(),
|
unstable_features: UnstableFeatures::from_environment(),
|
||||||
actually_rustdoc: true,
|
actually_rustdoc: true,
|
||||||
debugging_opts: debugging_options,
|
debugging_opts,
|
||||||
error_format,
|
error_format,
|
||||||
edition,
|
edition,
|
||||||
describe_lints,
|
describe_lints,
|
||||||
|
|||||||
@@ -472,7 +472,7 @@ fn run_renderer<T: formats::FormatRenderer>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn main_options(options: config::Options) -> MainResult {
|
fn main_options(options: config::Options) -> MainResult {
|
||||||
let diag = core::new_handler(options.error_format, None, &options.debugging_options);
|
let diag = core::new_handler(options.error_format, None, &options.debugging_opts);
|
||||||
|
|
||||||
match (options.should_test, options.markdown_input()) {
|
match (options.should_test, options.markdown_input()) {
|
||||||
(true, true) => return wrap_return(&diag, markdown::test(options)),
|
(true, true) => return wrap_return(&diag, markdown::test(options)),
|
||||||
@@ -488,7 +488,7 @@ fn main_options(options: config::Options) -> MainResult {
|
|||||||
|
|
||||||
// need to move these items separately because we lose them by the time the closure is called,
|
// need to move these items separately because we lose them by the time the closure is called,
|
||||||
// but we can't crates the Handler ahead of time because it's not Send
|
// but we can't crates the Handler ahead of time because it's not Send
|
||||||
let diag_opts = (options.error_format, options.edition, options.debugging_options.clone());
|
let diag_opts = (options.error_format, options.edition, options.debugging_opts.clone());
|
||||||
let show_coverage = options.show_coverage;
|
let show_coverage = options.show_coverage;
|
||||||
|
|
||||||
// First, parse the crate and extract all relevant information.
|
// First, parse the crate and extract all relevant information.
|
||||||
|
|||||||
@@ -281,7 +281,7 @@ fn run_test(
|
|||||||
for codegen_options_str in &options.codegen_options_strs {
|
for codegen_options_str in &options.codegen_options_strs {
|
||||||
compiler.arg("-C").arg(&codegen_options_str);
|
compiler.arg("-C").arg(&codegen_options_str);
|
||||||
}
|
}
|
||||||
for debugging_option_str in &options.debugging_options_strs {
|
for debugging_option_str in &options.debugging_opts_strs {
|
||||||
compiler.arg("-Z").arg(&debugging_option_str);
|
compiler.arg("-Z").arg(&debugging_option_str);
|
||||||
}
|
}
|
||||||
if no_run && !compile_fail {
|
if no_run && !compile_fail {
|
||||||
|
|||||||
Reference in New Issue
Block a user