about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-11-02 15:39:25 +0000
committerbors <bors@rust-lang.org>2018-11-02 15:39:25 +0000
commite53a5ffd6b1c28903b4ad9a4c433fd554802cd9c (patch)
tree0c5b144bed2655dd9500e57fb0c9df6bfb6b7ab8 /src/test/rustdoc
parent87a3c1ee7016bbfb782f2fd8adc75b46687ef929 (diff)
parent2b646059a1011dc3565a72702b45ff4c5f3800f9 (diff)
downloadrust-e53a5ffd6b1c28903b4ad9a4c433fd554802cd9c.tar.gz
rust-e53a5ffd6b1c28903b4ad9a4c433fd554802cd9c.zip
Auto merge of #54543 - GuillaumeGomez:top-level-index, r=QuietMisdreavus
Add index page argument

@Mark-Simulacrum: I might need some help from you: in bootstrap, I want to add an argument (a new flag added into `rustdoc`) in order to generate the current index directly when `rustdoc` is documenting the `std` lib. However, my change in `bootstrap` didn't do it and I assume it must be moved inside the `Std` struct. But there, I don't see how to pass it to `rustdoc` through `cargo`. Did I miss anything?

r? @QuietMisdreavus
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/index-page.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/rustdoc/index-page.rs b/src/test/rustdoc/index-page.rs
new file mode 100644
index 00000000000..9d35f8adeac
--- /dev/null
+++ b/src/test/rustdoc/index-page.rs
@@ -0,0 +1,18 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z unstable-options --enable-index-page
+
+#![crate_name = "foo"]
+
+// @has foo/../index.html
+// @has - '//span[@class="in-band"]' 'List of all crates'
+// @has - '//ul[@class="mod"]//a[@href="foo/index.html"]' 'foo'
+pub struct Foo;