diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2024-07-11 23:37:55 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2024-08-13 20:14:57 +0200 |
| commit | 903d2db4d22e947354385ed2fff42d0816143cfc (patch) | |
| tree | d384ebf0a12829691907920ecefbd7904930f25b | |
| parent | 7dcb841de040c85cf8e53e533917d6eade2c1777 (diff) | |
| download | rust-903d2db4d22e947354385ed2fff42d0816143cfc.tar.gz rust-903d2db4d22e947354385ed2fff42d0816143cfc.zip | |
Only keep "useful" code in `tests/rustdoc-ui/2024-doctests-checks.rs`
| -rw-r--r-- | tests/rustdoc-ui/2024-doctests-checks.rs | 18 | ||||
| -rw-r--r-- | tests/rustdoc-ui/2024-doctests-checks.stdout | 14 |
2 files changed, 8 insertions, 24 deletions
diff --git a/tests/rustdoc-ui/2024-doctests-checks.rs b/tests/rustdoc-ui/2024-doctests-checks.rs index f6b6faa8c6a..6f4db3a90f8 100644 --- a/tests/rustdoc-ui/2024-doctests-checks.rs +++ b/tests/rustdoc-ui/2024-doctests-checks.rs @@ -4,26 +4,12 @@ //@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" //@ normalize-stdout-test ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL" -/// This one should fail: crate attributes should remain crate attributes -/// in standalone doctests. -/// -/// ```compile_fail -/// #![deny(missing_docs)] -/// -/// pub struct Bar; -/// ``` -/// -/// This one should not impact the other merged doctests. -/// -/// ``` -/// #![deny(unused)] -/// ``` -/// /// ``` /// let x = 12; /// ``` /// -/// This one should not be a merged doctest (because of `$crate`): +/// This one should not be a merged doctest (because of `$crate`). The output +/// will confirm it by displaying both merged and standalone doctest passes. /// /// ``` /// macro_rules! bla { diff --git a/tests/rustdoc-ui/2024-doctests-checks.stdout b/tests/rustdoc-ui/2024-doctests-checks.stdout index 2c0136f7674..d1064084a85 100644 --- a/tests/rustdoc-ui/2024-doctests-checks.stdout +++ b/tests/rustdoc-ui/2024-doctests-checks.stdout @@ -1,14 +1,12 @@ -running 2 tests -test $DIR/2024-doctests-checks.rs - Foo (line 18) ... ok -test $DIR/2024-doctests-checks.rs - Foo (line 22) ... ok +running 1 test +test $DIR/2024-doctests-checks.rs - Foo (line 7) ... ok -test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME +test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME -running 2 tests -test $DIR/2024-doctests-checks.rs - Foo (line 10) - compile fail ... ok -test $DIR/2024-doctests-checks.rs - Foo (line 28) ... ok +running 1 test +test $DIR/2024-doctests-checks.rs - Foo (line 14) ... ok -test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME +test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME |
