1
Fork 0

tidy: remove redundant variable from check_if_error_code_is_test_in_explanation

This commit is contained in:
Matthias Krüger 2020-08-24 00:14:04 +02:00
parent d97c4703eb
commit ebac0e4727

View file

@ -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 {