about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMark Mansi <markm@cs.wisc.edu>2019-07-04 20:20:14 -0500
committerAndré Luis Leal Cardoso Junior <andrehjr@gmail.com>2019-07-06 11:05:22 -0300
commitf0e45bfe810fde06625ef71bd9bb3b51e3ebd745 (patch)
tree67e4507e2d77ed8d12455f96fc3f4e92ade10a6d
parent1de42ff95afe67322db47e04294e668f2a589109 (diff)
downloadrust-f0e45bfe810fde06625ef71bd9bb3b51e3ebd745.tar.gz
rust-f0e45bfe810fde06625ef71bd9bb3b51e3ebd745.zip
fix macos build
-rw-r--r--src/tools/rustbook/src/main.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/tools/rustbook/src/main.rs b/src/tools/rustbook/src/main.rs
index 668ee1edf36..a9f8167c5ac 100644
--- a/src/tools/rustbook/src/main.rs
+++ b/src/tools/rustbook/src/main.rs
@@ -12,6 +12,8 @@ use mdbook_1::errors::{Result as Result1};
 
 use mdbook::MDBook;
 use mdbook::errors::{Result as Result3};
+
+#[cfg(all(target_arch = "x86_64", target_os = "linux"))]
 use mdbook::renderer::RenderContext;
 
 #[cfg(all(target_arch = "x86_64", target_os = "linux"))]
@@ -79,9 +81,12 @@ fn main() {
             if let Err(err) = linkcheck(sub_matches) {
                 eprintln!("Error: {}", err);
 
-                if let Ok(broken_links) = err.downcast::<BrokenLinks>() {
-                    for cause in broken_links.links().iter() {
-                        eprintln!("\tCaused By: {}", cause);
+                #[cfg(all(target_arch = "x86_64", target_os = "linux"))]
+                {
+                    if let Ok(broken_links) = err.downcast::<BrokenLinks>() {
+                        for cause in broken_links.links().iter() {
+                            eprintln!("\tCaused By: {}", cause);
+                        }
                     }
                 }