diff options
| author | bors <bors@rust-lang.org> | 2014-05-30 02:11:45 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-05-30 02:11:45 -0700 |
| commit | 3a105464fbdf5ba9df7c97eaecffe9f8479f91b0 (patch) | |
| tree | cfe9cfbe364529d857313fd3a8a56f06dfbd29ba | |
| parent | 25951b22420c5ecb1428a225a4dbb9e7529cf181 (diff) | |
| parent | 1b3a03009215b518572b03dd4bf02dbcba129527 (diff) | |
| download | rust-3a105464fbdf5ba9df7c97eaecffe9f8479f91b0.tar.gz rust-3a105464fbdf5ba9df7c97eaecffe9f8479f91b0.zip | |
auto merge of #14517 : lucy/rust/issue-14499, r=alexcrichton
Fixes #8537
Fixes #14499 (duplicate of #8537)
Old:
```rust
test.rs:2 pub extern "xxxxx" fn add(x: int, y: int) -> int {
^~
```
New:
```rust
test.rs:2 pub extern "xxxxx" fn add(x: int, y: int) -> int {
^~~~~~~
```
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/issue-8537.rs | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 1902df30b99..9f8b3172a80 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -4537,7 +4537,7 @@ impl<'a> Parser<'a> { Some(abi) => Some(abi), None => { self.span_err( - self.span, + self.last_span, format!("illegal ABI: expected one of [{}], \ found `{}`", abi::all_names().connect(", "), diff --git a/src/test/compile-fail/issue-8537.rs b/src/test/compile-fail/issue-8537.rs new file mode 100644 index 00000000000..dba9e751f71 --- /dev/null +++ b/src/test/compile-fail/issue-8537.rs @@ -0,0 +1,15 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +pub extern + "invalid-abi" //~ ERROR illegal ABI +fn foo() {} + +fn main() {} |
