diff options
| -rw-r--r-- | src/tools/tidy/src/error_codes_check.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/tools/tidy/src/error_codes_check.rs b/src/tools/tidy/src/error_codes_check.rs index 2fa0f12d7e8..8d015e916eb 100644 --- a/src/tools/tidy/src/error_codes_check.rs +++ b/src/tools/tidy/src/error_codes_check.rs @@ -47,9 +47,7 @@ fn check_error_code_explanation( invalid_compile_fail_format } -fn check_if_error_code_is_test_in_explanation(f: &str, err_code: &String) -> bool { - let mut can_be_ignored = false; - +fn check_if_error_code_is_test_in_explanation(f: &str, err_code: &str) -> bool { for line in f.lines() { let s = line.trim(); if s.starts_with("#### Note: this error code is no longer emitted by the compiler") { @@ -60,11 +58,11 @@ fn check_if_error_code_is_test_in_explanation(f: &str, err_code: &String) -> boo return true; } else if s.contains("(") { // It's very likely that we can't actually make it fail compilation... - can_be_ignored = true; + return true; } } } - can_be_ignored + false } macro_rules! some_or_continue { |
