]> git.lizzy.rs Git - rust.git/commitdiff
Stabilize rustdoc theme options
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Mon, 1 Oct 2018 20:28:12 +0000 (22:28 +0200)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Mon, 18 Nov 2019 15:43:47 +0000 (16:43 +0100)
src/librustdoc/config.rs
src/librustdoc/lib.rs

index 3e1c57182b9f5cdd97dfb3cddb27a62def97ea0c..2b8e060ce8ea09347e893e773b9453a8ffc64f34 100644 (file)
@@ -364,7 +364,9 @@ pub fn from_matches(matches: &getopts::Matches) -> Result<Options, i32> {
                                                 .iter()
                                                 .map(|s| (PathBuf::from(&s), s.to_owned())) {
                 if !theme_file.is_file() {
-                    diag.struct_err("option --themes arguments must all be files").emit();
+                    diag.struct_err(&format!("invalid file: \"{}\"", theme_s))
+                        .help("option --themes arguments must all be files")
+                        .emit();
                     return Err(1);
                 }
                 let (success, ret) = theme::test_theme_against(&theme_file, &paths, &diag);
index 4f102dbf128f49d4d0ef910514ce6a4df5e1e7fe..27bef5db2d6d2740f451940d8e1adf6ca6d7ffa4 100644 (file)
@@ -251,12 +251,12 @@ fn opts() -> Vec<RustcOptGroup> {
             o.optflag("", "sort-modules-by-appearance", "sort modules by where they appear in the \
                                                          program, rather than alphabetically")
         }),
-        unstable("themes", |o| {
+        stable("themes", |o| {
             o.optmulti("", "themes",
                        "additional themes which will be added to the generated docs",
                        "FILES")
         }),
-        unstable("theme-checker", |o| {
+        stable("theme-checker", |o| {
             o.optmulti("", "theme-checker",
                        "check if given theme is valid",
                        "FILES")