Skip to content

Commit 7796f3f

Browse files
Don't set test_harness to true by default as it would generate invalid code for combined doctests
1 parent ed3fb4b commit 7796f3f

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Diff for: src/librustdoc/html/markdown.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ impl LangString {
894894
no_run: false,
895895
ignore: Ignore::None,
896896
rust: true,
897-
test_harness: true,
897+
test_harness: false,
898898
compile_fail: false,
899899
error_codes: Vec::new(),
900900
edition: None,

Diff for: tests/rustdoc-ui/doctest/cfg-test.stdout

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
running 2 tests
3-
test $DIR/cfg-test.rs - Foo (line 19) ... ok
43
test $DIR/cfg-test.rs - Bar (line 27) ... ok
4+
test $DIR/cfg-test.rs - Foo (line 19) ... ok
55

66
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
77

Diff for: tests/rustdoc-ui/doctest/doctest-output.stdout

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22
running 3 tests
33
test $DIR/doctest-output.rs - (line 8) ... ok
4-
test $DIR/doctest-output.rs - foo::bar (line 18) ... ok
54
test $DIR/doctest-output.rs - ExpandedStruct (line 24) ... ok
5+
test $DIR/doctest-output.rs - foo::bar (line 18) ... ok
66

77
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
88

Diff for: tests/rustdoc-ui/doctest/no-run-flag.stdout

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
running 6 tests
3-
test $DIR/no-run-flag.rs - f (line 14) ... ignored
43
test $DIR/no-run-flag.rs - f (line 11) ... ok
4+
test $DIR/no-run-flag.rs - f (line 14) ... ignored
55
test $DIR/no-run-flag.rs - f (line 17) ... ok
66
test $DIR/no-run-flag.rs - f (line 28) ... ok
77
test $DIR/no-run-flag.rs - f (line 32) ... ok

0 commit comments

Comments
 (0)