Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 6 pull requests #90200

Closed
wants to merge 38 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
4b3f82a
Add updated support for example-analyzer
willcrichton May 9, 2021
7831fee
Fix check issue
willcrichton May 30, 2021
2855bf0
Factor scraping and rendering into separate calls to rustdoc
willcrichton Jun 1, 2021
b6338e7
Generate example source files with corresponding links
willcrichton Jun 3, 2021
eea8f0a
Sort examples by size
willcrichton Aug 26, 2021
55bb517
Move highlighting logic from JS to Rust
willcrichton Aug 26, 2021
18edcf8
Reduce blur size, fix example width bug, add better error handling fo…
willcrichton Sep 14, 2021
a1cb194
Add styles for non-white themes
willcrichton Sep 14, 2021
829b1a9
Incorporate jyn's feedback
willcrichton Sep 17, 2021
5c05b3c
Add target crates as inputs to reduce size of intermediates
willcrichton Sep 20, 2021
df5e3a6
Change serialized format to use DefPathHash instead of custom String
willcrichton Sep 21, 2021
25323ec
Move JS into a standalone file
willcrichton Oct 1, 2021
55731bb
Fix lint error, change scrape-examples.js minify call
willcrichton Oct 1, 2021
ed8e12f
Unversioned -> InvocationSpecific
willcrichton Oct 1, 2021
5584c79
Update to latest rustc and rustdoc styles
willcrichton Oct 7, 2021
bb383ed
Move some expansion logic into generation-time, fix section header li…
willcrichton Oct 7, 2021
8b141a2
Add variance constraints for const params
voidc Oct 7, 2021
e22e858
Move more scrape-examples logic from JS to rust
willcrichton Oct 7, 2021
f10dcee
Change handling of spans in scrape examples, add test for highlight d…
willcrichton Oct 8, 2021
9e4958a
Add test for prev/back arrows + examples across multiple files
willcrichton Oct 9, 2021
b1616f3
Add test for ordering of examples, simplify with single scrape.mk file
willcrichton Oct 9, 2021
59b36bc
Add UI test for the variance of types appearing in consts
voidc Oct 12, 2021
a400f10
Bless tests
voidc Oct 12, 2021
24a71cb
Fix local crate not being scraped
willcrichton Oct 13, 2021
02e4d0b
Make all proc-macro back-compat lints deny-by-default
Aaron1011 Aug 15, 2021
a836676
Update the minimum external LLVM to 11
cuviper Oct 19, 2021
5a87d1a
llvm-dwp-11 fails on absolute paths
cuviper Oct 19, 2021
8f80d86
Small scrape-example fixes
willcrichton Oct 20, 2021
d1c29c6
Revert def_id addition from clean::Function, add test for
willcrichton Oct 22, 2021
fd5d614
Move def_id logic into render_call_locations
willcrichton Oct 22, 2021
e4aeeca
Reset qualifs when a storage of a local ends
tmiasko Oct 22, 2021
fd25491
Add caveat about changing parallelism and function call overhead
the8472 Oct 23, 2021
a7f2bc1
Rollup merge of #85833 - willcrichton:example-analyzer, r=jyn514
matthiaskrgr Oct 23, 2021
0c85cd4
Rollup merge of #88041 - Aaron1011:deny-proc-macro-hack, r=wesleywiser
matthiaskrgr Oct 23, 2021
809e5c8
Rollup merge of #89829 - voidc:assoc-const-variance, r=lcnr
matthiaskrgr Oct 23, 2021
684402e
Rollup merge of #90062 - cuviper:min-llvm-11, r=nikic
matthiaskrgr Oct 23, 2021
6584391
Rollup merge of #90168 - tmiasko:const-qualif-storage, r=matthewjasper
matthiaskrgr Oct 23, 2021
f99f296
Rollup merge of #90198 - the8472:available-parallelism-runtime, r=jos…
matthiaskrgr Oct 23, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add test for prev/back arrows + examples across multiple files
  • Loading branch information
willcrichton committed Oct 9, 2021
commit 9e4958a3e6c48630b777244adad80d1381ada32a
21 changes: 21 additions & 0 deletions src/test/run-make/rustdoc-scrape-examples-multiple/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-include ../../run-make-fulldeps/tools.mk

OUTPUT_DIR := "$(TMPDIR)/rustdoc"

all: $(TMPDIR)/ex.calls $(TMPDIR)/ex2.calls
$(RUSTDOC) src/lib.rs --crate-name foobar --crate-type lib --output $(OUTPUT_DIR) \
-Z unstable-options \
--with-examples $(TMPDIR)/ex.calls \
--with-examples $(TMPDIR)/ex2.calls

$(HTMLDOCCK) $(OUTPUT_DIR) src/lib.rs

$(TMPDIR)/%.calls: $(TMPDIR)/libfoobar.rmeta
$(RUSTDOC) examples/$*.rs --crate-name $* --crate-type bin --output $(OUTPUT_DIR) \
--extern foobar=$(TMPDIR)/libfoobar.rmeta \
-Z unstable-options \
--scrape-examples-output-path $@ \
--scrape-examples-target-crate foobar

$(TMPDIR)/lib%.rmeta: src/lib.rs
$(RUSTC) src/lib.rs --crate-name $* --crate-type lib --emit=metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
fn main() {
foobar::ok();
foobar::ok();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
foobar::ok();
}
4 changes: 4 additions & 0 deletions src/test/run-make/rustdoc-scrape-examples-multiple/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// @has foobar/fn.ok.html '//*[@class="prev"]' ''
// @has foobar/fn.ok.html '//*[@class="more-scraped-examples"]' ''

pub fn ok() {}