]> git.lizzy.rs Git - rust.git/commitdiff
s/DocTestsOption/DocTests/g
authorkennytm <kennytm@gmail.com>
Sat, 5 May 2018 19:30:42 +0000 (03:30 +0800)
committerkennytm <kennytm@gmail.com>
Sat, 5 May 2018 19:30:42 +0000 (03:30 +0800)
src/bootstrap/builder.rs
src/bootstrap/flags.rs
src/bootstrap/lib.rs
src/bootstrap/test.rs

index da12fbdb942e46d6cd287a98bbd8c9634ef525ee..10027640272913a79dad59a70868d05e85a4aabb 100644 (file)
@@ -25,7 +25,7 @@
 use install;
 use dist;
 use util::{exe, libdir, add_lib_path};
-use {Build, Mode, DocTestsOption};
+use {Build, Mode, DocTests};
 use cache::{INTERNER, Interned, Cache};
 use check;
 use test;
@@ -591,7 +591,7 @@ pub fn cargo(&self,
                 format!("{} {}", env::var("RUSTFLAGS").unwrap_or_default(), extra_args));
         }
 
-        let want_rustdoc = self.doc_tests != DocTestsOption::No;
+        let want_rustdoc = self.doc_tests != DocTests::No;
 
         // Customize the compiler we're running. Specify the compiler to cargo
         // as our shim and then pass it some various options used to configure
@@ -1415,7 +1415,7 @@ fn test_with_no_doc_stage0() {
             test_args: vec![],
             rustc_args: vec![],
             fail_fast: true,
-            doc_tests: DocTestsOption::No,
+            doc_tests: DocTests::No,
         };
 
         let build = Build::new(config);
index fb7c8ba1351392fd6cc4cb25b9290ad2099636d3..5315a3028ffa9c05fa8d3839ff52b223ddad9a4d 100644 (file)
@@ -19,7 +19,7 @@
 
 use getopts::Options;
 
-use {Build, DocTestsOption};
+use {Build, DocTests};
 use config::Config;
 use metadata;
 use builder::Builder;
@@ -62,7 +62,7 @@ pub enum Subcommand {
         test_args: Vec<String>,
         rustc_args: Vec<String>,
         fail_fast: bool,
-        doc_tests: DocTestsOption,
+        doc_tests: DocTests,
     },
     Bench {
         paths: Vec<PathBuf>,
@@ -326,11 +326,11 @@ pub fn parse(args: &[String]) -> Flags {
                     rustc_args: matches.opt_strs("rustc-args"),
                     fail_fast: !matches.opt_present("no-fail-fast"),
                     doc_tests: if matches.opt_present("doc") {
-                        DocTestsOption::Only
+                        DocTests::Only
                     } else if matches.opt_present("no-doc") {
-                        DocTestsOption::No
+                        DocTests::No
                     } else {
-                        DocTestsOption::Yes
+                        DocTests::Yes
                     }
                 }
             }
@@ -418,10 +418,10 @@ pub fn fail_fast(&self) -> bool {
         }
     }
 
-    pub fn doc_tests(&self) -> DocTestsOption {
+    pub fn doc_tests(&self) -> DocTests {
         match *self {
             Subcommand::Test { doc_tests, .. } => doc_tests,
-            _ => DocTestsOption::Yes,
+            _ => DocTests::Yes,
         }
     }
 }
index ff9a262e2cc76df588046eea7415fe730547ee82..e53fef06786130e03c26611efb51998211c60b76 100644 (file)
@@ -211,7 +211,7 @@ pub struct Compiler {
 }
 
 #[derive(PartialEq, Eq, Copy, Clone, Debug)]
-pub enum DocTestsOption {
+pub enum DocTests {
     // Default, run normal tests and doc tests.
     Yes,
     // Do not run any doc tests.
@@ -243,7 +243,7 @@ pub struct Build {
     rustfmt_info: channel::GitInfo,
     local_rebuild: bool,
     fail_fast: bool,
-    doc_tests: DocTestsOption,
+    doc_tests: DocTests,
     verbosity: usize,
 
     // Targets for which to build.
index 2f0e3868f89aef8af987b4cf12eb9006a8fcfacb..cbb952bab61b2c2ee6221f161a49a1d76037dd5b 100644 (file)
@@ -32,7 +32,7 @@
 use native;
 use tool::{self, Tool};
 use util::{self, dylib_path, dylib_path_var};
-use {Mode, DocTestsOption};
+use {Mode, DocTests};
 use toolstate::ToolState;
 
 const ADB_TEST_DIR: &str = "/data/tmp/work";
@@ -1520,13 +1520,13 @@ fn run(self, builder: &Builder) {
             cargo.arg("--no-fail-fast");
         }
         match builder.doc_tests {
-            DocTestsOption::Only => {
+            DocTests::Only => {
                 cargo.arg("--doc");
             }
-            DocTestsOption::No => {
+            DocTests::No => {
                 cargo.args(&["--lib", "--bins", "--examples", "--tests", "--benches"]);
             }
-            DocTestsOption::Yes => {}
+            DocTests::Yes => {}
         }
 
         cargo.arg("-p").arg(krate);