From c4c452678b8aad3175be4e556db47be7118ab557 Mon Sep 17 00:00:00 2001
From: Yuki Okushi <huyuumi.dev@gmail.com>
Date: Wed, 8 Jul 2020 07:32:18 +0900
Subject: [PATCH] Put index.html using unstable rustdoc features

---
 README.md | 5 ++---
 ci/dox.sh | 6 ++++--
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index ae2cfd86..d4f6ab9e 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,6 @@
-[![Azure Status]][Azure] [![Cirrus CI Status]][Cirrus CI] [![Latest Version]][crates.io] [![Documentation]][docs.rs] ![License]
+# libc - Raw FFI bindings to platforms' system libraries
 
-libc - Raw FFI bindings to platforms' system libraries
-====
+[![Azure Status]][Azure] [![Cirrus CI Status]][Cirrus CI] [![Latest Version]][crates.io] [![Documentation]][docs.rs] ![License]
 
 `libc` provides all of the definitions necessary to easily interoperate with C
 code (or "C-like" code) on each of the platforms that Rust supports. This
diff --git a/ci/dox.sh b/ci/dox.sh
index 271b54b4..88f75130 100644
--- a/ci/dox.sh
+++ b/ci/dox.sh
@@ -52,9 +52,9 @@ while read -r target; do
 
     # If cargo doc fails, then try xargo:
     if ! cargo doc --target "${target}" \
-             --no-default-features  --features extra_traits ; then
+        --no-default-features --features extra_traits ; then
         cargo xdoc --target "${target}" \
-              --no-default-features  --features extra_traits
+        --no-default-features --features extra_traits
     fi
 
     cp -r "target/${target}/doc" "${TARGET_DOC_DIR}/${target}"
@@ -70,5 +70,7 @@ set +x
 { head -n "$((line-1))" $README; cat $PLATFORM_SUPPORT; tail -n "+$((line+1))" $README; } > $TARGET_DOC_DIR/$README
 set -x
 
+RUSTDOCFLAGS="--enable-index-page --index-page=${TARGET_DOC_DIR}/${README} -Zunstable-options" cargo doc
+
 # Copy the licenses
 cp LICENSE-* $TARGET_DOC_DIR/
-- 
GitLab