Skip to content

Commit f3e4279

Browse files
Apply review comments
1 parent dcccd28 commit f3e4279

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

src/doc/rustdoc/src/command-line-arguments.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,8 @@ $ rustdoc src/lib.rs --themes /path/to/your/theme/file.css
371371
### `theme-checker`: check if your themes implement all the required rules
372372

373373
This flag allows you to check if your themes implement the necessary CSS rules. To put it more
374-
simply, when adding a new theme, it needs to implements all the CSS rules present in the `ðark` and
375-
`light` CSS themes.
374+
simply, when adding a new theme, it needs to implements all the CSS rules present in the "light"
375+
CSS theme.
376376

377377
You can use this flag like this:
378378

src/librustdoc/config.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,15 @@ impl Options {
370370
return Err(1);
371371
}
372372
let (success, ret) = theme::test_theme_against(&theme_file, &paths, &diag);
373-
if !success || !ret.is_empty() {
374-
diag.struct_warn(&format!("invalid theme: \"{}\"", theme_s))
375-
.help("check what's wrong with the --theme-checker option")
373+
if !success {
374+
diag.struct_warn(&format!("error loading theme file: \"{}\"", theme_s)).emit();
375+
return Err(1);
376+
} else if !ret.is_empty() {
377+
diag.struct_warn(&format!("theme file \"{}\" is missing CSS rules from the \
378+
default theme", theme_s))
379+
.warn("the theme may appear incorrect when loaded")
380+
.help(&format!("to see what rules are missing, call `rustdoc \
381+
--theme-checker \"{}\"`", theme_s))
376382
.emit();
377383
}
378384
themes.push(theme_file);

0 commit comments

Comments
 (0)