Skip to content

Commit bc7bce4

Browse files
committed
Rename debugging_options -> debugging_opts to match rustc
This way the rustdoc field names are the same as the rustc field names.
1 parent 1a6c3d4 commit bc7bce4

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

src/librustdoc/config.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ pub struct Options {
8383
/// Codegen options strings to hand to the compiler.
8484
pub codegen_options_strs: Vec<String>,
8585
/// Debugging (`-Z`) options to pass to the compiler.
86-
pub debugging_options: DebuggingOptions,
86+
pub debugging_opts: DebuggingOptions,
8787
/// Debugging (`-Z`) options strings to pass to the compiler.
88-
pub debugging_options_strs: Vec<String>,
88+
pub debugging_opts_strs: Vec<String>,
8989
/// The target used to compile the crate against.
9090
pub target: TargetTriple,
9191
/// Edition used when reading the crate. Defaults to "2015". Also used by default when
@@ -318,9 +318,9 @@ impl Options {
318318
let error_format = config::parse_error_format(&matches, color, json_rendered);
319319

320320
let codegen_options = build_codegen_options(matches, error_format);
321-
let debugging_options = build_debugging_options(matches, error_format);
321+
let debugging_opts = build_debugging_options(matches, error_format);
322322

323-
let diag = new_handler(error_format, None, &debugging_options);
323+
let diag = new_handler(error_format, None, &debugging_opts);
324324

325325
// check for deprecated options
326326
check_deprecated_options(&matches, &diag);
@@ -365,7 +365,7 @@ impl Options {
365365
.iter()
366366
.map(|s| SearchPath::from_cli_opt(s, error_format))
367367
.collect();
368-
let externs = parse_externs(&matches, &debugging_options, error_format);
368+
let externs = parse_externs(&matches, &debugging_opts, error_format);
369369
let extern_html_root_urls = match parse_extern_html_roots(&matches) {
370370
Ok(ex) => ex,
371371
Err(err) => {
@@ -546,7 +546,7 @@ impl Options {
546546
let persist_doctests = matches.opt_str("persist-doctests").map(PathBuf::from);
547547
let test_builder = matches.opt_str("test-builder").map(PathBuf::from);
548548
let codegen_options_strs = matches.opt_strs("C");
549-
let debugging_options_strs = matches.opt_strs("Z");
549+
let debugging_opts_strs = matches.opt_strs("Z");
550550
let lib_strs = matches.opt_strs("L");
551551
let extern_strs = matches.opt_strs("extern");
552552
let runtool = matches.opt_str("runtool");
@@ -569,8 +569,8 @@ impl Options {
569569
cfgs,
570570
codegen_options,
571571
codegen_options_strs,
572-
debugging_options,
573-
debugging_options_strs,
572+
debugging_opts,
573+
debugging_opts_strs,
574574
target,
575575
edition,
576576
maybe_sysroot,

src/librustdoc/core.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ pub fn run_core(
294294
externs,
295295
mut cfgs,
296296
codegen_options,
297-
debugging_options,
297+
debugging_opts,
298298
target,
299299
edition,
300300
maybe_sysroot,
@@ -364,7 +364,7 @@ pub fn run_core(
364364
target_triple: target,
365365
unstable_features: UnstableFeatures::from_environment(),
366366
actually_rustdoc: true,
367-
debugging_opts: debugging_options,
367+
debugging_opts,
368368
error_format,
369369
edition,
370370
describe_lints,

src/librustdoc/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ fn run_renderer<T: formats::FormatRenderer>(
472472
}
473473

474474
fn main_options(options: config::Options) -> MainResult {
475-
let diag = core::new_handler(options.error_format, None, &options.debugging_options);
475+
let diag = core::new_handler(options.error_format, None, &options.debugging_opts);
476476

477477
match (options.should_test, options.markdown_input()) {
478478
(true, true) => return wrap_return(&diag, markdown::test(options)),
@@ -488,7 +488,7 @@ fn main_options(options: config::Options) -> MainResult {
488488

489489
// need to move these items separately because we lose them by the time the closure is called,
490490
// but we can't crates the Handler ahead of time because it's not Send
491-
let diag_opts = (options.error_format, options.edition, options.debugging_options.clone());
491+
let diag_opts = (options.error_format, options.edition, options.debugging_opts.clone());
492492
let show_coverage = options.show_coverage;
493493

494494
// First, parse the crate and extract all relevant information.

src/librustdoc/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ fn run_test(
281281
for codegen_options_str in &options.codegen_options_strs {
282282
compiler.arg("-C").arg(&codegen_options_str);
283283
}
284-
for debugging_option_str in &options.debugging_options_strs {
284+
for debugging_option_str in &options.debugging_opts_strs {
285285
compiler.arg("-Z").arg(&debugging_option_str);
286286
}
287287
if no_run && !compile_fail {

0 commit comments

Comments
 (0)