]> git.lizzy.rs Git - rust.git/commitdiff
Apply review comments
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Fri, 24 May 2019 08:39:49 +0000 (10:39 +0200)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Mon, 18 Nov 2019 15:43:47 +0000 (16:43 +0100)
src/doc/rustdoc/src/command-line-arguments.md
src/librustdoc/config.rs

index 9bbb396323d120486a7bdc65e1ddd5e18b537788..2c25baf373ed269b31b46a5ec4e1092e3f342f56 100644 (file)
@@ -371,8 +371,8 @@ $ rustdoc src/lib.rs --themes /path/to/your/theme/file.css
 ### `theme-checker`: check if your themes implement all the required rules
 
 This flag allows you to check if your themes implement the necessary CSS rules. To put it more
-simply, when adding a new theme, it needs to implements all the CSS rules present in the `ðark` and
-`light` CSS themes.
+simply, when adding a new theme, it needs to implements all the CSS rules present in the "light"
+CSS theme.
 
 You can use this flag like this:
 
index 853be97530b939e017b7668b4aef1f1ed6a7f1df..068da1f194120afc6cee5d48999c6b1886366e89 100644 (file)
@@ -370,9 +370,15 @@ pub fn from_matches(matches: &getopts::Matches) -> Result<Options, i32> {
                     return Err(1);
                 }
                 let (success, ret) = theme::test_theme_against(&theme_file, &paths, &diag);
-                if !success || !ret.is_empty() {
-                    diag.struct_warn(&format!("invalid theme: \"{}\"", theme_s))
-                        .help("check what's wrong with the --theme-checker option")
+                if !success {
+                    diag.struct_warn(&format!("error loading theme file: \"{}\"", theme_s)).emit();
+                    return Err(1);
+                } else if !ret.is_empty() {
+                    diag.struct_warn(&format!("theme file \"{}\" is missing CSS rules from the \
+                                               default theme", theme_s))
+                        .warn("the theme may appear incorrect when loaded")
+                        .help(&format!("to see what rules are missing, call `rustdoc \
+                                        --theme-checker \"{}\"`", theme_s))
                         .emit();
                 }
                 themes.push(theme_file);