]> git.lizzy.rs Git - rust.git/commitdiff
Update error format for E0130
authortrixnz <mtatrix@gmail.com>
Thu, 4 Aug 2016 21:15:58 +0000 (23:15 +0200)
committertrixnz <me@trix.nz>
Wed, 10 Aug 2016 17:55:54 +0000 (19:55 +0200)
src/librustc_passes/ast_validation.rs
src/test/compile-fail/E0130.rs

index 91d2500564fd3b7d246f406fcb8d117fb0fede0b..341c9d820e6519b060445ec621a56a3cc49faee4 100644 (file)
@@ -183,6 +183,7 @@ fn visit_foreign_item(&mut self, fi: &ForeignItem) {
                                                    E0130,
                                                    "patterns aren't allowed in foreign function \
                                                     declarations");
+                    err.span_label(span, &format!("pattern not allowed in foreign function"));
                     if is_recent {
                         err.span_note(span,
                                       "this is a recent error, see issue #35203 for more details");
index ef5961e133894d37c90103238f9cbb280d64fd58..e9e027fd1dc1972aea32aabfc7005274dd2c4f76 100644 (file)
@@ -9,7 +9,9 @@
 // except according to those terms.
 
 extern {
-    fn foo((a, b): (u32, u32)); //~ ERROR E0130
+    fn foo((a, b): (u32, u32));
+    //~^ ERROR E0130
+    //~| NOTE pattern not allowed in foreign function
 }
 
 fn main() {