File tree Expand file tree Collapse file tree 4 files changed +32
-0
lines changed
src/test/run-make/rustdoc-scrape-examples-multiple Expand file tree Collapse file tree 4 files changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ -include ../../run-make-fulldeps/tools.mk
2
+
3
+ OUTPUT_DIR := "$(TMPDIR ) /rustdoc"
4
+
5
+ all : $(TMPDIR ) /ex.calls $(TMPDIR ) /ex2.calls
6
+ $(RUSTDOC ) src/lib.rs --crate-name foobar --crate-type lib --output $(OUTPUT_DIR ) \
7
+ -Z unstable-options \
8
+ --with-examples $(TMPDIR ) /ex.calls \
9
+ --with-examples $(TMPDIR ) /ex2.calls
10
+
11
+ $(HTMLDOCCK) $(OUTPUT_DIR) src/lib.rs
12
+
13
+ $(TMPDIR ) /% .calls : $(TMPDIR ) /libfoobar.rmeta
14
+ $(RUSTDOC ) examples/$* .rs --crate-name $* --crate-type bin --output $(OUTPUT_DIR ) \
15
+ --extern foobar=$(TMPDIR ) /libfoobar.rmeta \
16
+ -Z unstable-options \
17
+ --scrape-examples-output-path $@ \
18
+ --scrape-examples-target-crate foobar
19
+
20
+ $(TMPDIR ) /lib% .rmeta : src/lib.rs
21
+ $(RUSTC ) src/lib.rs --crate-name $* --crate-type lib --emit=metadata
Original file line number Diff line number Diff line change
1
+ fn main ( ) {
2
+ foobar:: ok ( ) ;
3
+ foobar:: ok ( ) ;
4
+ }
Original file line number Diff line number Diff line change
1
+ fn main ( ) {
2
+ foobar:: ok ( ) ;
3
+ }
Original file line number Diff line number Diff line change
1
+ // @has foobar/fn.ok.html '//*[@class="prev"]' ''
2
+ // @has foobar/fn.ok.html '//*[@class="more-scraped-examples"]' ''
3
+
4
+ pub fn ok ( ) { }
You can’t perform that action at this time.
0 commit comments