diff options
| author | trixnz <mtatrix@gmail.com> | 2016-08-04 23:15:58 +0200 |
|---|---|---|
| committer | trixnz <me@trix.nz> | 2016-08-10 19:55:54 +0200 |
| commit | f656a92cbbd39d62021b692df0e57c6d7a29f2fd (patch) | |
| tree | db0596e2729f601ae2c9f179ea12d3dc4e504e46 | |
| parent | ae774103501337ed63b42b673c6c4fdbf369e80e (diff) | |
| download | rust-f656a92cbbd39d62021b692df0e57c6d7a29f2fd.tar.gz rust-f656a92cbbd39d62021b692df0e57c6d7a29f2fd.zip | |
Update error format for E0130
| -rw-r--r-- | src/librustc_passes/ast_validation.rs | 1 | ||||
| -rw-r--r-- | src/test/compile-fail/E0130.rs | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/librustc_passes/ast_validation.rs b/src/librustc_passes/ast_validation.rs index 91d2500564f..341c9d820e6 100644 --- a/src/librustc_passes/ast_validation.rs +++ b/src/librustc_passes/ast_validation.rs @@ -183,6 +183,7 @@ impl<'a> Visitor for AstValidator<'a> { 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"); diff --git a/src/test/compile-fail/E0130.rs b/src/test/compile-fail/E0130.rs index ef5961e1338..e9e027fd1dc 100644 --- a/src/test/compile-fail/E0130.rs +++ b/src/test/compile-fail/E0130.rs @@ -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() { |
