Skip to content

Commit 54e8216

Browse files
Update error code detection in compile_fail doctests
1 parent 96a6a5f commit 54e8216

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustdoc/doctest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ fn run_test(
333333
(true, false) => {}
334334
(false, true) => {
335335
if !error_codes.is_empty() {
336-
error_codes.retain(|err| !out.contains(&format!("error[{}]: ", err)));
336+
error_codes.retain(|err| !out.contains(&format!("error[{}]", err)));
337337

338338
if !error_codes.is_empty() {
339339
return Err(TestFailure::MissingErrorCodes(error_codes));

0 commit comments

Comments
 (0)