aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xetc/rustdoc-with-private4
-rw-r--r--python/servo/post_build_commands.py4
2 files changed, 7 insertions, 1 deletions
diff --git a/etc/rustdoc-with-private b/etc/rustdoc-with-private
new file mode 100755
index 00000000000..770469ac064
--- /dev/null
+++ b/etc/rustdoc-with-private
@@ -0,0 +1,4 @@
+#!/bin/sh
+# Skip the strip-private and strip-hidden rustdoc passes
+# https://github.com/rust-lang/rust/issues/15347
+rustdoc --no-defaults --passes "collapse-docs unindent-comments" "$@"
diff --git a/python/servo/post_build_commands.py b/python/servo/post_build_commands.py
index efa315158f8..fbeec5a6193 100644
--- a/python/servo/post_build_commands.py
+++ b/python/servo/post_build_commands.py
@@ -156,8 +156,10 @@ class MachCommands(CommandBase):
else:
copy2(full_name, destination)
+ env = self.build_env()
+ env['RUSTDOC'] = '../../etc/rustdoc-with-private'
return subprocess.call(["cargo", "doc"] + params,
- env=self.build_env(), cwd=self.servo_crate())
+ env=env, cwd=self.servo_crate())
@Command('browse-doc',
description='Generate documentation and open it in a web browser',