Skip to content

Commit 3a10546

Browse files
committed
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 { ^~~~~~~ ```
2 parents 25951b2 + 1b3a030 commit 3a10546

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/libsyntax/parse/parser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4537,7 +4537,7 @@ impl<'a> Parser<'a> {
45374537
Some(abi) => Some(abi),
45384538
None => {
45394539
self.span_err(
4540-
self.span,
4540+
self.last_span,
45414541
format!("illegal ABI: expected one of [{}], \
45424542
found `{}`",
45434543
abi::all_names().connect(", "),

src/test/compile-fail/issue-8537.rs

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
pub extern
12+
"invalid-abi" //~ ERROR illegal ABI
13+
fn foo() {}
14+
15+
fn main() {}

0 commit comments

Comments
 (0)