diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs index 8c3ee3fb5f4..dbb5703978a 100644 --- a/src/compiletest/runtest.rs +++ b/src/compiletest/runtest.rs @@ -1009,6 +1009,10 @@ fn check_expected_errors(revision: Option<&str>, expected.replace(r"\", "/") }).collect::>(); + // If the testcase being checked contains at least one expected "help" + // message, then we'll ensure that all "help" messages are expected. + // Otherwise, all "help" messages reported by the compiler will be ignored. + // This logic also applies to "note" messages. let (expect_help, expect_note) = expected_errors.iter() .fold((false, false),