about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2016-03-15 16:33:59 -0400
committerCorey Farwell <coreyf@rwell.org>2016-03-15 16:33:59 -0400
commit6ed7846257af7c2da9d2164916eb8fe150b50ec2 (patch)
treeb0d8b3a722159b8cc10d3ee0728c0ad6a14c9606
parent1efa752ea694f7ae125cdaf7911ad44b8e6b0e33 (diff)
downloadrust-6ed7846257af7c2da9d2164916eb8fe150b50ec2.tar.gz
rust-6ed7846257af7c2da9d2164916eb8fe150b50ec2.zip
Add comment about opt-in nature of compiletest note/help messages.
The opt-in functionality was proposed and discussed in
https://github.com/rust-lang/rust/issues/21195
-rw-r--r--src/compiletest/runtest.rs4
1 files changed, 4 insertions, 0 deletions
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::<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),