]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/config.rs
Rollup merge of #102786 - compiler-errors:no-tuple-candidate, r=lcnr
[rust.git] / src / librustdoc / config.rs
index 8a8cc272e8195a22a3f9b0677aaa0028d319033e..932533db05c14066f43ceed4dab20604847c42e0 100644 (file)
@@ -412,7 +412,13 @@ fn println_condition(condition: Condition) {
 
         let to_check = matches.opt_strs("check-theme");
         if !to_check.is_empty() {
-            let paths = theme::load_css_paths(static_files::themes::LIGHT.as_bytes());
+            let paths = match theme::load_css_paths(static_files::themes::LIGHT) {
+                Ok(p) => p,
+                Err(e) => {
+                    diag.struct_err(&e.to_string()).emit();
+                    return Err(1);
+                }
+            };
             let mut errors = 0;
 
             println!("rustdoc: [check-theme] Starting tests! (Ignoring all other arguments)");
@@ -547,7 +553,13 @@ fn println_condition(condition: Condition) {
 
         let mut themes = Vec::new();
         if matches.opt_present("theme") {
-            let paths = theme::load_css_paths(static_files::themes::LIGHT.as_bytes());
+            let paths = match theme::load_css_paths(static_files::themes::LIGHT) {
+                Ok(p) => p,
+                Err(e) => {
+                    diag.struct_err(&e.to_string()).emit();
+                    return Err(1);
+                }
+            };
 
             for (theme_file, theme_s) in
                 matches.opt_strs("theme").iter().map(|s| (PathBuf::from(&s), s.to_owned()))