forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#75665 - GuillaumeGomez:doc-examples-coverag…
…e, r=jyn514 Add doc examples coverage r? @jyn514
- Loading branch information
Showing
13 changed files
with
173 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
+-------------------------------------+------------+------------+------------+ | ||
| File | Documented | Total | Percentage | | ||
+-------------------------------------+------------+------------+------------+ | ||
| ...est/rustdoc-ui/coverage/basic.rs | 7 | 14 | 50.0% | | ||
+-------------------------------------+------------+------------+------------+ | ||
| Total | 7 | 14 | 50.0% | | ||
+-------------------------------------+------------+------------+------------+ | ||
+-------------------------------------+------------+------------+------------+------------+------------+ | ||
| File | Documented | Total | Percentage | Examples | Percentage | | ||
+-------------------------------------+------------+------------+------------+------------+------------+ | ||
| ...est/rustdoc-ui/coverage/basic.rs | 7 | 14 | 50.0% | 0 | 0.0% | | ||
+-------------------------------------+------------+------------+------------+------------+------------+ | ||
| Total | 7 | 14 | 50.0% | 0 | 0.0% | | ||
+-------------------------------------+------------+------------+------------+------------+------------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// compile-flags:-Z unstable-options --show-coverage | ||
// check-pass | ||
|
||
//! This test ensure that only rust code examples are counted. | ||
|
||
/// Doc | ||
/// | ||
/// ``` | ||
/// let x = 2; | ||
/// ``` | ||
pub struct Foo; | ||
|
||
/// Doc | ||
/// | ||
/// ```text | ||
/// yolo | ||
/// ``` | ||
pub trait Bar {} | ||
|
||
/// Doc | ||
/// | ||
/// ```ignore (just for the sake of this test) | ||
/// let x = 2; | ||
/// ``` | ||
pub fn foo<T: Bar, D: ::std::fmt::Debug>(a: Foo, b: u32, c: T, d: D) -> u32 { | ||
0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
+-------------------------------------+------------+------------+------------+------------+------------+ | ||
| File | Documented | Total | Percentage | Examples | Percentage | | ||
+-------------------------------------+------------+------------+------------+------------+------------+ | ||
| ...tdoc-ui/coverage/doc-examples.rs | 4 | 4 | 100.0% | 2 | 50.0% | | ||
+-------------------------------------+------------+------------+------------+------------+------------+ | ||
| Total | 4 | 4 | 100.0% | 2 | 50.0% | | ||
+-------------------------------------+------------+------------+------------+------------+------------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
+-------------------------------------+------------+------------+------------+ | ||
| File | Documented | Total | Percentage | | ||
+-------------------------------------+------------+------------+------------+ | ||
| ...est/rustdoc-ui/coverage/empty.rs | 0 | 1 | 0.0% | | ||
+-------------------------------------+------------+------------+------------+ | ||
| Total | 0 | 1 | 0.0% | | ||
+-------------------------------------+------------+------------+------------+ | ||
+-------------------------------------+------------+------------+------------+------------+------------+ | ||
| File | Documented | Total | Percentage | Examples | Percentage | | ||
+-------------------------------------+------------+------------+------------+------------+------------+ | ||
| ...est/rustdoc-ui/coverage/empty.rs | 0 | 1 | 0.0% | 0 | 0.0% | | ||
+-------------------------------------+------------+------------+------------+------------+------------+ | ||
| Total | 0 | 1 | 0.0% | 0 | 0.0% | | ||
+-------------------------------------+------------+------------+------------+------------+------------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
+-------------------------------------+------------+------------+------------+ | ||
| File | Documented | Total | Percentage | | ||
+-------------------------------------+------------+------------+------------+ | ||
| ...est/rustdoc-ui/coverage/enums.rs | 6 | 8 | 75.0% | | ||
+-------------------------------------+------------+------------+------------+ | ||
| Total | 6 | 8 | 75.0% | | ||
+-------------------------------------+------------+------------+------------+ | ||
+-------------------------------------+------------+------------+------------+------------+------------+ | ||
| File | Documented | Total | Percentage | Examples | Percentage | | ||
+-------------------------------------+------------+------------+------------+------------+------------+ | ||
| ...est/rustdoc-ui/coverage/enums.rs | 6 | 8 | 75.0% | 0 | 0.0% | | ||
+-------------------------------------+------------+------------+------------+------------+------------+ | ||
| Total | 6 | 8 | 75.0% | 0 | 0.0% | | ||
+-------------------------------------+------------+------------+------------+------------+------------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
+-------------------------------------+------------+------------+------------+ | ||
| File | Documented | Total | Percentage | | ||
+-------------------------------------+------------+------------+------------+ | ||
| ...st/rustdoc-ui/coverage/exotic.rs | 1 | 1 | 100.0% | | ||
| <anon> | 2 | 2 | 100.0% | | ||
+-------------------------------------+------------+------------+------------+ | ||
| Total | 3 | 3 | 100.0% | | ||
+-------------------------------------+------------+------------+------------+ | ||
+-------------------------------------+------------+------------+------------+------------+------------+ | ||
| File | Documented | Total | Percentage | Examples | Percentage | | ||
+-------------------------------------+------------+------------+------------+------------+------------+ | ||
| ...st/rustdoc-ui/coverage/exotic.rs | 1 | 1 | 100.0% | 0 | 0.0% | | ||
| <anon> | 2 | 2 | 100.0% | 0 | 0.0% | | ||
+-------------------------------------+------------+------------+------------+------------+------------+ | ||
| Total | 3 | 3 | 100.0% | 0 | 0.0% | | ||
+-------------------------------------+------------+------------+------------+------------+------------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"$DIR/json.rs":{"total":13,"with_docs":7}} | ||
{"$DIR/json.rs":{"total":13,"with_docs":7,"with_examples":0}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
+-------------------------------------+------------+------------+------------+ | ||
| File | Documented | Total | Percentage | | ||
+-------------------------------------+------------+------------+------------+ | ||
| ...t/rustdoc-ui/coverage/private.rs | 4 | 7 | 57.1% | | ||
+-------------------------------------+------------+------------+------------+ | ||
| Total | 4 | 7 | 57.1% | | ||
+-------------------------------------+------------+------------+------------+ | ||
+-------------------------------------+------------+------------+------------+------------+------------+ | ||
| File | Documented | Total | Percentage | Examples | Percentage | | ||
+-------------------------------------+------------+------------+------------+------------+------------+ | ||
| ...t/rustdoc-ui/coverage/private.rs | 4 | 7 | 57.1% | 0 | 0.0% | | ||
+-------------------------------------+------------+------------+------------+------------+------------+ | ||
| Total | 4 | 7 | 57.1% | 0 | 0.0% | | ||
+-------------------------------------+------------+------------+------------+------------+------------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
+-------------------------------------+------------+------------+------------+ | ||
| File | Documented | Total | Percentage | | ||
+-------------------------------------+------------+------------+------------+ | ||
| ...oc-ui/coverage/statics-consts.rs | 6 | 7 | 85.7% | | ||
+-------------------------------------+------------+------------+------------+ | ||
| Total | 6 | 7 | 85.7% | | ||
+-------------------------------------+------------+------------+------------+ | ||
+-------------------------------------+------------+------------+------------+------------+------------+ | ||
| File | Documented | Total | Percentage | Examples | Percentage | | ||
+-------------------------------------+------------+------------+------------+------------+------------+ | ||
| ...oc-ui/coverage/statics-consts.rs | 6 | 7 | 85.7% | 0 | 0.0% | | ||
+-------------------------------------+------------+------------+------------+------------+------------+ | ||
| Total | 6 | 7 | 85.7% | 0 | 0.0% | | ||
+-------------------------------------+------------+------------+------------+------------+------------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
+-------------------------------------+------------+------------+------------+ | ||
| File | Documented | Total | Percentage | | ||
+-------------------------------------+------------+------------+------------+ | ||
| ...st/rustdoc-ui/coverage/traits.rs | 6 | 7 | 85.7% | | ||
+-------------------------------------+------------+------------+------------+ | ||
| Total | 6 | 7 | 85.7% | | ||
+-------------------------------------+------------+------------+------------+ | ||
+-------------------------------------+------------+------------+------------+------------+------------+ | ||
| File | Documented | Total | Percentage | Examples | Percentage | | ||
+-------------------------------------+------------+------------+------------+------------+------------+ | ||
| ...st/rustdoc-ui/coverage/traits.rs | 6 | 7 | 85.7% | 0 | 0.0% | | ||
+-------------------------------------+------------+------------+------------+------------+------------+ | ||
| Total | 6 | 7 | 85.7% | 0 | 0.0% | | ||
+-------------------------------------+------------+------------+------------+------------+------------+ |