Skip to content

Commit ebac0e4

Browse files
committed
tidy: remove redundant variable from check_if_error_code_is_test_in_explanation
1 parent d97c470 commit ebac0e4

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/tools/tidy/src/error_codes_check.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ fn check_error_code_explanation(
4747
invalid_compile_fail_format
4848
}
4949

50-
fn check_if_error_code_is_test_in_explanation(f: &str, err_code: &String) -> bool {
51-
let mut can_be_ignored = false;
52-
50+
fn check_if_error_code_is_test_in_explanation(f: &str, err_code: &str) -> bool {
5351
for line in f.lines() {
5452
let s = line.trim();
5553
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
6058
return true;
6159
} else if s.contains("(") {
6260
// It's very likely that we can't actually make it fail compilation...
63-
can_be_ignored = true;
61+
return true;
6462
}
6563
}
6664
}
67-
can_be_ignored
65+
false
6866
}
6967

7068
macro_rules! some_or_continue {

0 commit comments

Comments
 (0)