Skip to content

Commit 05af55b

Browse files
committed
s/DocTestsOption/DocTests/g
1 parent 169f58b commit 05af55b

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

src/bootstrap/builder.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use compile;
2525
use install;
2626
use dist;
2727
use util::{exe, libdir, add_lib_path};
28-
use {Build, Mode, DocTestsOption};
28+
use {Build, Mode, DocTests};
2929
use cache::{INTERNER, Interned, Cache};
3030
use check;
3131
use test;
@@ -591,7 +591,7 @@ impl<'a> Builder<'a> {
591591
format!("{} {}", env::var("RUSTFLAGS").unwrap_or_default(), extra_args));
592592
}
593593

594-
let want_rustdoc = self.doc_tests != DocTestsOption::No;
594+
let want_rustdoc = self.doc_tests != DocTests::No;
595595

596596
// Customize the compiler we're running. Specify the compiler to cargo
597597
// as our shim and then pass it some various options used to configure
@@ -1415,7 +1415,7 @@ mod __test {
14151415
test_args: vec![],
14161416
rustc_args: vec![],
14171417
fail_fast: true,
1418-
doc_tests: DocTestsOption::No,
1418+
doc_tests: DocTests::No,
14191419
};
14201420

14211421
let build = Build::new(config);

src/bootstrap/flags.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use std::process;
1919

2020
use getopts::Options;
2121

22-
use {Build, DocTestsOption};
22+
use {Build, DocTests};
2323
use config::Config;
2424
use metadata;
2525
use builder::Builder;
@@ -62,7 +62,7 @@ pub enum Subcommand {
6262
test_args: Vec<String>,
6363
rustc_args: Vec<String>,
6464
fail_fast: bool,
65-
doc_tests: DocTestsOption,
65+
doc_tests: DocTests,
6666
},
6767
Bench {
6868
paths: Vec<PathBuf>,
@@ -326,11 +326,11 @@ Arguments:
326326
rustc_args: matches.opt_strs("rustc-args"),
327327
fail_fast: !matches.opt_present("no-fail-fast"),
328328
doc_tests: if matches.opt_present("doc") {
329-
DocTestsOption::Only
329+
DocTests::Only
330330
} else if matches.opt_present("no-doc") {
331-
DocTestsOption::No
331+
DocTests::No
332332
} else {
333-
DocTestsOption::Yes
333+
DocTests::Yes
334334
}
335335
}
336336
}
@@ -418,10 +418,10 @@ impl Subcommand {
418418
}
419419
}
420420

421-
pub fn doc_tests(&self) -> DocTestsOption {
421+
pub fn doc_tests(&self) -> DocTests {
422422
match *self {
423423
Subcommand::Test { doc_tests, .. } => doc_tests,
424-
_ => DocTestsOption::Yes,
424+
_ => DocTests::Yes,
425425
}
426426
}
427427
}

src/bootstrap/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ pub struct Compiler {
211211
}
212212

213213
#[derive(PartialEq, Eq, Copy, Clone, Debug)]
214-
pub enum DocTestsOption {
214+
pub enum DocTests {
215215
// Default, run normal tests and doc tests.
216216
Yes,
217217
// Do not run any doc tests.
@@ -243,7 +243,7 @@ pub struct Build {
243243
rustfmt_info: channel::GitInfo,
244244
local_rebuild: bool,
245245
fail_fast: bool,
246-
doc_tests: DocTestsOption,
246+
doc_tests: DocTests,
247247
verbosity: usize,
248248

249249
// Targets for which to build.

src/bootstrap/test.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use dist;
3232
use native;
3333
use tool::{self, Tool};
3434
use util::{self, dylib_path, dylib_path_var};
35-
use {Mode, DocTestsOption};
35+
use {Mode, DocTests};
3636
use toolstate::ToolState;
3737

3838
const ADB_TEST_DIR: &str = "/data/tmp/work";
@@ -1520,13 +1520,13 @@ impl Step for Crate {
15201520
cargo.arg("--no-fail-fast");
15211521
}
15221522
match builder.doc_tests {
1523-
DocTestsOption::Only => {
1523+
DocTests::Only => {
15241524
cargo.arg("--doc");
15251525
}
1526-
DocTestsOption::No => {
1526+
DocTests::No => {
15271527
cargo.args(&["--lib", "--bins", "--examples", "--tests", "--benches"]);
15281528
}
1529-
DocTestsOption::Yes => {}
1529+
DocTests::Yes => {}
15301530
}
15311531

15321532
cargo.arg("-p").arg(krate);

0 commit comments

Comments
 (0)