]> git.lizzy.rs Git - rust.git/commitdiff
Add comment about opt-in nature of compiletest note/help messages.
authorCorey Farwell <coreyf@rwell.org>
Tue, 15 Mar 2016 20:33:59 +0000 (16:33 -0400)
committerCorey Farwell <coreyf@rwell.org>
Tue, 15 Mar 2016 20:33:59 +0000 (16:33 -0400)
The opt-in functionality was proposed and discussed in
https://github.com/rust-lang/rust/issues/21195

src/compiletest/runtest.rs

index 8c3ee3fb5f4b6f373da59026ccf244da87bb2bd8..dbb5703978a75cd72491efa654cf774afee53687 100644 (file)
@@ -1009,6 +1009,10 @@ fn check_expected_errors(revision: Option<&str>,
         expected.replace(r"\", "/")
     }).collect::<Vec<String>>();
 
+    // 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),