diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-10-23 14:58:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-23 14:58:39 +0200 |
| commit | dcf9242795fdd0be3873492fb36f77533dbf017c (patch) | |
| tree | 15474e950bd74b1db9c7cd5f62681b11fa2944ff /src/test/rustdoc-ui | |
| parent | 55ccbd090d96ec3bb28dbcb383e65bbfa3c293ff (diff) | |
| parent | fd5d614b7708c2bbd0a7c796af3c3b63f31a19ac (diff) | |
| download | rust-dcf9242795fdd0be3873492fb36f77533dbf017c.tar.gz rust-dcf9242795fdd0be3873492fb36f77533dbf017c.zip | |
Rollup merge of #85833 - willcrichton:example-analyzer, r=jyn514
Scrape code examples from examples/ directory for Rustdoc Adds support for the functionality described in https://github.com/rust-lang/rfcs/pull/3123 Matching changes to Cargo are here: https://github.com/rust-lang/cargo/pull/9525 Live demo here: https://willcrichton.net/example-analyzer/warp/trait.Filter.html#method.and
Diffstat (limited to 'src/test/rustdoc-ui')
4 files changed, 6 insertions, 0 deletions
diff --git a/src/test/rustdoc-ui/scrape-examples-wrong-options-1.rs b/src/test/rustdoc-ui/scrape-examples-wrong-options-1.rs new file mode 100644 index 00000000000..a1f005c32ee --- /dev/null +++ b/src/test/rustdoc-ui/scrape-examples-wrong-options-1.rs @@ -0,0 +1 @@ +// compile-flags: -Z unstable-options --scrape-examples-target-crate foobar diff --git a/src/test/rustdoc-ui/scrape-examples-wrong-options-1.stderr b/src/test/rustdoc-ui/scrape-examples-wrong-options-1.stderr new file mode 100644 index 00000000000..eb8e9f79968 --- /dev/null +++ b/src/test/rustdoc-ui/scrape-examples-wrong-options-1.stderr @@ -0,0 +1,2 @@ +error: must use --scrape-examples-output-path and --scrape-examples-target-crate together + diff --git a/src/test/rustdoc-ui/scrape-examples-wrong-options-2.rs b/src/test/rustdoc-ui/scrape-examples-wrong-options-2.rs new file mode 100644 index 00000000000..4aacec7f094 --- /dev/null +++ b/src/test/rustdoc-ui/scrape-examples-wrong-options-2.rs @@ -0,0 +1 @@ +// compile-flags: -Z unstable-options --scrape-examples-output-path ex.calls diff --git a/src/test/rustdoc-ui/scrape-examples-wrong-options-2.stderr b/src/test/rustdoc-ui/scrape-examples-wrong-options-2.stderr new file mode 100644 index 00000000000..eb8e9f79968 --- /dev/null +++ b/src/test/rustdoc-ui/scrape-examples-wrong-options-2.stderr @@ -0,0 +1,2 @@ +error: must use --scrape-examples-output-path and --scrape-examples-target-crate together + |
