diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-08-20 21:15:02 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-08-20 21:26:57 +0200 |
| commit | 9c254c18d6d32a15879cc7f57e3039b66a481340 (patch) | |
| tree | 4d7f7b354e9d640f71022568d707208132b987a0 /src/test/rustdoc-ui/coverage/doc-examples-json.rs | |
| parent | 631c80659dab1e6f0b335cd7862eddc341eff0ac (diff) | |
| download | rust-9c254c18d6d32a15879cc7f57e3039b66a481340.tar.gz rust-9c254c18d6d32a15879cc7f57e3039b66a481340.zip | |
Update how doc examples are counted
Diffstat (limited to 'src/test/rustdoc-ui/coverage/doc-examples-json.rs')
| -rw-r--r-- | src/test/rustdoc-ui/coverage/doc-examples-json.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/rustdoc-ui/coverage/doc-examples-json.rs b/src/test/rustdoc-ui/coverage/doc-examples-json.rs new file mode 100644 index 00000000000..1da1813790e --- /dev/null +++ b/src/test/rustdoc-ui/coverage/doc-examples-json.rs @@ -0,0 +1,13 @@ +// check-pass +// compile-flags:-Z unstable-options --output-format json --show-coverage + +// This check ensures that only one doc example is counted since they're "optional" on +// certain items. + +/// ``` +/// let x = 12; +/// ``` +pub const Foo: u32 = 0; + +/// doc +pub const Bar: u32 = 0; |
