File tree 27 files changed +282
-0
lines changed
tests/rustdoc/cross-crate-info
cargo-transitive-no-index
write-docs-somewhere-else
27 files changed +282
-0
lines changed Original file line number Diff line number Diff line change
1
+ //@ build-aux-docs
2
+
3
+
4
+ pub struct Quebec ;
Original file line number Diff line number Diff line change
1
+ //@ aux-build:q.rs
2
+ //@ build-aux-docs
3
+
4
+
5
+ extern crate q;
6
+ pub trait Tango { }
Original file line number Diff line number Diff line change
1
+ //@ aux-build:t.rs
2
+ //@ build-aux-docs
3
+
4
+ //@ has t/trait.Tango.html
5
+ //@ hasraw search-index.js 'Quebec'
6
+ //@ hasraw trait.impl/t/trait.Tango.js 'struct.Sierra.html'
7
+ //@ hasraw s/struct.Sierra.html 'Tango'
8
+ //@ hasraw search-index.js 'Sierra'
9
+ //@ hasraw search-index.js 'Tango'
10
+ //@ has q/struct.Quebec.html
11
+ //@ has s/struct.Sierra.html
12
+
13
+ // We document multiple crates into the same output directory, which merges the cross-crate information. Everything is available.
14
+
15
+ extern crate t;
16
+ pub struct Sierra ;
17
+ impl t:: Tango for Sierra { }
Original file line number Diff line number Diff line change
1
+ //@ build-aux-docs
2
+ //@ doc-flags:--enable-index-page
3
+ //@ doc-flags:-Zunstable-options
4
+
5
+
6
+ pub struct Quebec ;
Original file line number Diff line number Diff line change
1
+ //@ aux-build:q.rs
2
+ //@ build-aux-docs
3
+ //@ doc-flags:--enable-index-page
4
+ //@ doc-flags:-Zunstable-options
5
+
6
+
7
+ extern crate q;
8
+ pub trait Tango { }
Original file line number Diff line number Diff line change
1
+ //@ aux-build:t.rs
2
+ //@ build-aux-docs
3
+ //@ doc-flags:--enable-index-page
4
+ //@ doc-flags:-Zunstable-options
5
+
6
+ //@ has t/trait.Tango.html
7
+ //@ hasraw search-index.js 'Quebec'
8
+ //@ has index.html '//ul[@class="all-items"]//a[@href="q/index.html"]' 'q'
9
+ //@ hasraw s/struct.Sierra.html 'Tango'
10
+ //@ hasraw trait.impl/t/trait.Tango.js 'struct.Sierra.html'
11
+ //@ has index.html '//ul[@class="all-items"]//a[@href="t/index.html"]' 't'
12
+ //@ has index.html '//h1' 'List of all crates'
13
+ //@ has index.html '//ul[@class="all-items"]//a[@href="s/index.html"]' 's'
14
+ //@ hasraw search-index.js 'Sierra'
15
+ //@ hasraw search-index.js 'Tango'
16
+ //@ has index.html
17
+ //@ has q/struct.Quebec.html
18
+ //@ has s/struct.Sierra.html
19
+
20
+ // We document multiple crates into the same output directory, which merges the cross-crate information. Everything is available.
21
+
22
+ extern crate t;
23
+ pub struct Sierra ;
24
+ impl t:: Tango for Sierra { }
Original file line number Diff line number Diff line change
1
+ //@ build-aux-docs
2
+
3
+
4
+ pub trait Foxtrot { }
Original file line number Diff line number Diff line change
1
+ //@ aux-build:f.rs
2
+ //@ build-aux-docs
3
+
4
+ //@ hasraw search-index.js 'Echo'
5
+ //@ hasraw search-index.js 'Foxtrot'
6
+ //@ hasraw trait.impl/f/trait.Foxtrot.js 'enum.Echo.html'
7
+ //@ has f/trait.Foxtrot.html
8
+ //@ has e/enum.Echo.html
9
+ //@ hasraw e/enum.Echo.html 'Foxtrot'
10
+
11
+ // document two crates in the same way that cargo does. do not provide --enable-index-page
12
+
13
+ extern crate f;
14
+ pub enum Echo { }
15
+ impl f:: Foxtrot for Echo { }
Original file line number Diff line number Diff line change
1
+ //@ build-aux-docs
2
+ //@ doc-flags:--enable-index-page
3
+ //@ doc-flags:-Zunstable-options
4
+
5
+
6
+ pub trait Foxtrot { }
Original file line number Diff line number Diff line change
1
+ //@ aux-build:f.rs
2
+ //@ build-aux-docs
3
+ //@ doc-flags:--enable-index-page
4
+ //@ doc-flags:-Zunstable-options
5
+
6
+ //@ hasraw search-index.js 'Echo'
7
+ //@ hasraw search-index.js 'Foxtrot'
8
+ //@ has index.html '//ul[@class="all-items"]//a[@href="e/index.html"]' 'e'
9
+ //@ has index.html '//ul[@class="all-items"]//a[@href="f/index.html"]' 'f'
10
+ //@ hasraw trait.impl/f/trait.Foxtrot.js 'enum.Echo.html'
11
+ //@ has f/trait.Foxtrot.html
12
+ //@ has index.html '//h1' 'List of all crates'
13
+ //@ has e/enum.Echo.html
14
+ //@ has index.html
15
+ //@ hasraw e/enum.Echo.html 'Foxtrot'
16
+
17
+ // document two crates in the same way that cargo does, writing them both into the same output directory
18
+
19
+ extern crate f;
20
+ pub enum Echo { }
21
+ impl f:: Foxtrot for Echo { }
Original file line number Diff line number Diff line change
1
+ //@ build-aux-docs
2
+
3
+
4
+ pub trait Foxtrot { }
Original file line number Diff line number Diff line change
1
+ //@ aux-build:f.rs
2
+ //@ build-aux-docs
3
+ //@ doc-flags:--enable-index-page
4
+ //@ doc-flags:-Zunstable-options
5
+
6
+ //@ hasraw search-index.js 'Echo'
7
+ //@ hasraw search-index.js 'Foxtrot'
8
+ //@ has index.html '//ul[@class="all-items"]//a[@href="e/index.html"]' 'e'
9
+ //@ has index.html '//ul[@class="all-items"]//a[@href="f/index.html"]' 'f'
10
+ //@ hasraw trait.impl/f/trait.Foxtrot.js 'enum.Echo.html'
11
+ //@ has f/trait.Foxtrot.html
12
+ //@ has index.html '//h1' 'List of all crates'
13
+ //@ has e/enum.Echo.html
14
+ //@ has index.html
15
+ //@ hasraw e/enum.Echo.html 'Foxtrot'
16
+
17
+ // only declare --enable-index-page to the last rustdoc invocation
18
+
19
+ extern crate f;
20
+ pub enum Echo { }
21
+ impl f:: Foxtrot for Echo { }
Original file line number Diff line number Diff line change
1
+ //@ build-aux-docs
2
+ //@ doc-flags:--enable-index-page
3
+ //@ doc-flags:-Zunstable-options
4
+
5
+
6
+ pub struct Quebec ;
Original file line number Diff line number Diff line change
1
+ //@ aux-build:s.rs
2
+ //@ build-aux-docs
3
+ //@ doc-flags:--enable-index-page
4
+ //@ doc-flags:-Zunstable-options
5
+
6
+
7
+ extern crate s;
8
+ pub type Romeo = s:: Sierra ;
Original file line number Diff line number Diff line change
1
+ //@ aux-build:t.rs
2
+ //@ build-aux-docs
3
+ //@ doc-flags:--enable-index-page
4
+ //@ doc-flags:-Zunstable-options
5
+
6
+
7
+ extern crate t;
8
+ pub struct Sierra ;
9
+ impl t:: Tango for Sierra { }
Original file line number Diff line number Diff line change
1
+ //@ aux-build:q.rs
2
+ //@ build-aux-docs
3
+ //@ doc-flags:--enable-index-page
4
+ //@ doc-flags:-Zunstable-options
5
+
6
+
7
+ extern crate q;
8
+ pub trait Tango { }
Original file line number Diff line number Diff line change
1
+ //@ aux-build:q.rs
2
+ //@ aux-build:r.rs
3
+ //@ aux-build:t.rs
4
+ //@ aux-build:s.rs
5
+ //@ build-aux-docs
6
+ //@ doc-flags:--enable-index-page
7
+ //@ doc-flags:-Zunstable-options
8
+
9
+ //@ hasraw search-index.js 'Quebec'
10
+ //@ hasraw search-index.js 'Sierra'
11
+ //@ has index.html
12
+ //@ has s/struct.Sierra.html
13
+ //@ hasraw s/struct.Sierra.html 'Tango'
14
+ //@ has index.html '//ul[@class="all-items"]//a[@href="i/index.html"]' 'i'
15
+ //@ has q/struct.Quebec.html
16
+ //@ has type.impl/s/struct.Sierra.js
17
+ //@ hasraw type.impl/s/struct.Sierra.js 'Romeo'
18
+ //@ hasraw type.impl/s/struct.Sierra.js 'Tango'
19
+ //@ has index.html '//ul[@class="all-items"]//a[@href="q/index.html"]' 'q'
20
+ //@ has index.html '//ul[@class="all-items"]//a[@href="t/index.html"]' 't'
21
+ //@ has index.html '//ul[@class="all-items"]//a[@href="s/index.html"]' 's'
22
+ //@ has r/type.Romeo.html
23
+ //@ has t/trait.Tango.html
24
+ //@ hasraw search-index.js 'Romeo'
25
+ //@ hasraw trait.impl/t/trait.Tango.js 'struct.Sierra.html'
26
+ //@ has index.html '//h1' 'List of all crates'
27
+ //@ hasraw search-index.js 'Tango'
28
+ //@ has index.html '//ul[@class="all-items"]//a[@href="r/index.html"]' 'r'
29
+
30
+ // document everything in the default mode
31
+
32
+
Original file line number Diff line number Diff line change
1
+ //@ build-aux-docs
2
+ //@ doc-flags:--enable-index-page
3
+ //@ doc-flags:-Zunstable-options
4
+
5
+ //@ hasraw search-index.js 'Quebec'
6
+ //@ has index.html '//ul[@class="all-items"]//a[@href="q/index.html"]' 'q'
7
+ //@ has index.html '//h1' 'List of all crates'
8
+ //@ has index.html
9
+ //@ has q/struct.Quebec.html
10
+
11
+ // there's nothing cross-crate going on here
12
+
13
+ pub struct Quebec ;
Original file line number Diff line number Diff line change
1
+ //@ build-aux-docs
2
+
3
+ //@ hasraw search-index.js 'Quebec'
4
+ //@ has q/struct.Quebec.html
5
+
6
+ // there's nothing cross-crate going on here
7
+
8
+ pub struct Quebec ;
Original file line number Diff line number Diff line change
1
+ //@ build-aux-docs
2
+
3
+
4
+ pub struct Quebec ;
Original file line number Diff line number Diff line change
1
+ //@ aux-build:q.rs
2
+ //@ build-aux-docs
3
+
4
+
5
+ extern crate q;
6
+ pub trait Tango { }
Original file line number Diff line number Diff line change
1
+ //@ aux-build:t.rs
2
+ //@ build-aux-docs
3
+
4
+
5
+ // simple test to see if we support building transitive crates
6
+
7
+ extern crate t;
8
+ pub struct Sierra ;
9
+ impl t:: Tango for Sierra { }
Original file line number Diff line number Diff line change
1
+ //@ build-aux-docs
2
+
3
+
4
+ pub trait Foxtrot { }
Original file line number Diff line number Diff line change
1
+ //@ aux-build:f.rs
2
+ //@ build-aux-docs
3
+
4
+
5
+ // simple test to assert that we can do a two-level aux-build
6
+
7
+ extern crate f;
8
+ pub enum Echo { }
9
+ impl f:: Foxtrot for Echo { }
Original file line number Diff line number Diff line change
1
+ //@ build-aux-docs
2
+ //@ doc-flags:--scrape-examples-output-path=examples
3
+ //@ doc-flags:--scrape-examples-target-crate=q
4
+ //@ doc-flags:-Zunstable-options
5
+
6
+ //@ has examples
7
+
8
+ // where will --scrape-examples-output-path resolve the path to be? should be the root output directory
9
+
10
+ pub struct Quebec ;
Original file line number Diff line number Diff line change
1
+ //@ build-aux-docs
2
+ //@ unique-doc-out-dir
3
+
4
+
5
+ pub trait Foxtrot { }
Original file line number Diff line number Diff line change
1
+ //@ aux-build:f.rs
2
+ //@ build-aux-docs
3
+
4
+ //@ hasraw search-index.js 'Echo'
5
+ //@ !hasraw search-index.js 'Foxtrot'
6
+ //@ hasraw trait.impl/f/trait.Foxtrot.js 'enum.Echo.html'
7
+ //@ !has f/trait.Foxtrot.html
8
+ //@ has e/enum.Echo.html
9
+ //@ hasraw e/enum.Echo.html 'Foxtrot'
10
+
11
+ // test the fact that our test runner will document this crate somewhere else
12
+
13
+ extern crate f;
14
+ pub enum Echo { }
15
+ impl f:: Foxtrot for Echo { }
You can’t perform that action at this time.
0 commit comments