Skip to content

Commit b001ba6

Browse files
Add FIXME comments to use test::ERROR_EXIT_CODE once public and fix typo
1 parent 5f2ae4f commit b001ba6

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

src/librustdoc/doctest.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -836,6 +836,7 @@ fn run_test(
836836
match result {
837837
Err(e) => return (duration, Err(TestFailure::ExecutionError(e))),
838838
Ok(out) => {
839+
// FIXME: use test::ERROR_EXIT_CODE once public
839840
if langstr.should_panic && out.status.code() != Some(101) {
840841
return (duration, Err(TestFailure::UnexpectedRunPass));
841842
} else if !langstr.should_panic && !out.status.success() {

src/librustdoc/doctest/runner.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ mod __doctest_mod {{
143143
.output()
144144
.expect(\"failed to run command\");
145145
if should_panic {{
146+
// FIXME: use test::ERROR_EXIT_CODE once public
146147
if out.status.code() != Some(101) {{
147148
eprintln!(\"Test didn't panic, but it's marked `should_panic`.\");
148149
ExitCode::FAILURE

tests/run-make/rustdoc-should-panic/rmake.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Test didn't panic, but it's marked `should_panic`.",
1919
for text in should_contain {
2020
assert!(
2121
output.contains(text),
22-
"output doesn't contains (edition: {edition}) {:?}\nfull output: {output}",
22+
"output (edition: {edition}) doesn't contain {:?}\nfull output: {output}",
2323
text
2424
);
2525
}

0 commit comments

Comments
 (0)