tidy: remove redundant variable from check_if_error_code_is_test_in_explanation
This commit is contained in:
parent
d97c4703eb
commit
ebac0e4727
1 changed files with 3 additions and 5 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue