Skip to content

Commit 9f58a1e

Browse files
Only keep "useful" code in tests/rustdoc-ui/2024-doctests-checks.rs
1 parent 5b6bd4d commit 9f58a1e

File tree

2 files changed

+8
-24
lines changed

2 files changed

+8
-24
lines changed

tests/rustdoc-ui/2024-doctests-checks.rs

+2-16
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,12 @@
44
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
55
//@ normalize-stdout-test ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
66

7-
/// This one should fail: crate attributes should remain crate attributes
8-
/// in standalone doctests.
9-
///
10-
/// ```compile_fail
11-
/// #![deny(missing_docs)]
12-
///
13-
/// pub struct Bar;
14-
/// ```
15-
///
16-
/// This one should not impact the other merged doctests.
17-
///
18-
/// ```
19-
/// #![deny(unused)]
20-
/// ```
21-
///
227
/// ```
238
/// let x = 12;
249
/// ```
2510
///
26-
/// This one should not be a merged doctest (because of `$crate`):
11+
/// This one should not be a merged doctest (because of `$crate`). The output
12+
/// will confirm it by displaying both merged and standalone doctest passes.
2713
///
2814
/// ```
2915
/// macro_rules! bla {
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11

2-
running 2 tests
3-
test $DIR/2024-doctests-checks.rs - Foo (line 18) ... ok
4-
test $DIR/2024-doctests-checks.rs - Foo (line 22) ... ok
2+
running 1 test
3+
test $DIR/2024-doctests-checks.rs - Foo (line 7) ... ok
54

6-
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
5+
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
76

87

9-
running 2 tests
10-
test $DIR/2024-doctests-checks.rs - Foo (line 10) - compile fail ... ok
11-
test $DIR/2024-doctests-checks.rs - Foo (line 28) ... ok
8+
running 1 test
9+
test $DIR/2024-doctests-checks.rs - Foo (line 14) ... ok
1210

13-
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
11+
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
1412

0 commit comments

Comments
 (0)