Remove unused abi attributes.

They've been replaced by putting the name on the extern block.

  #[abi = "foo"]

goes to

  extern "foo" { }

Closes #9483.
This commit is contained in:
Steve Klabnik 2013-09-29 07:46:26 -07:00
parent 5b10781c7b
commit 16fc6a694c
34 changed files with 56 additions and 129 deletions

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[abi = "cdecl"];
#[link_name = "rustrt"];
#[link(name = "anonexternmod",
vers = "0.1")];
@ -17,6 +16,6 @@
use std::libc;
extern {
extern "cdecl" {
pub fn rust_get_test_int() -> libc::intptr_t;
}

View file

@ -9,7 +9,6 @@
// except according to those terms.
pub mod rusti {
#[abi = "rust-intrinsic"]
extern "rust-intrinsic" {
pub fn atomic_cxchg(dst: &mut int, old: int, src: int) -> int;
pub fn atomic_cxchg_acq(dst: &mut int, old: int, src: int) -> int;

View file

@ -11,8 +11,7 @@
mod test {
#[abi = "cdecl"]
extern {
extern "cdecl" {
pub fn free();
}
}

View file

@ -10,9 +10,8 @@
use std::libc;
#[abi = "cdecl"]
#[link_name = "rustrt"]
extern {
extern "cdecl" {
fn rust_get_test_int() -> libc::intptr_t;
}

View file

@ -11,8 +11,7 @@
mod rustrt {
use std::libc;
#[abi = "cdecl"]
extern {
extern "cdecl" {
pub fn rust_get_test_int() -> libc::intptr_t;
}
}

View file

@ -11,9 +11,8 @@
mod libc {
use std::libc::{c_char, c_long, c_longlong};
#[abi = "cdecl"]
#[nolink]
extern {
extern "cdecl" {
pub fn atol(x: *c_char) -> c_long;
pub fn atoll(x: *c_char) -> c_longlong;
}

View file

@ -21,15 +21,13 @@ static b: bool = true;
mod rustrt {
#[cfg(bogus)]
#[abi = "cdecl"]
extern {
extern "cdecl" {
// This symbol doesn't exist and would be a link error if this
// module was translated
pub fn bogus();
}
#[abi = "cdecl"]
extern {}
extern "cdecl" {}
}
#[cfg(bogus)]
@ -109,8 +107,7 @@ fn test_in_fn_ctxt() {
mod test_foreign_items {
pub mod rustrt {
#[abi = "cdecl"]
extern {
extern "cdecl" {
#[cfg(bogus)]
pub fn rust_get_stdin() -> ~str;
pub fn rust_get_stdin() -> ~str;

View file

@ -14,9 +14,8 @@
mod rustrt1 {
use std::libc;
#[abi = "cdecl"]
#[link_name = "rustrt"]
extern {
extern "cdecl" {
pub fn rust_get_test_int() -> libc::intptr_t;
}
}
@ -24,9 +23,8 @@ mod rustrt1 {
mod rustrt2 {
use std::libc;
#[abi = "cdecl"]
#[link_name = "rustrt"]
extern {
extern "cdecl" {
pub fn rust_get_test_int() -> libc::intptr_t;
}
}

View file

@ -14,8 +14,7 @@ mod libc {
use std::libc::{c_char, size_t};
#[nolink]
#[abi = "cdecl"]
extern {
extern "cdecl" {
#[link_name = "strlen"]
pub fn my_strlen(str: *c_char) -> size_t;
}

View file

@ -9,31 +9,27 @@
// except according to those terms.
mod bar {
#[abi = "cdecl"]
#[nolink]
extern {}
extern "cdecl" {}
}
mod zed {
#[abi = "cdecl"]
#[nolink]
extern {}
extern "cdecl" {}
}
mod libc {
use std::libc::{c_int, c_void, size_t, ssize_t};
#[abi = "cdecl"]
#[nolink]
extern {
extern "cdecl" {
pub fn write(fd: c_int, buf: *c_void, count: size_t) -> ssize_t;
}
}
mod baz {
#[abi = "cdecl"]
#[nolink]
extern {}
extern "cdecl" {}
}
pub fn main() { }

View file

@ -11,7 +11,6 @@
// xfail-fast Does not work with main in a submodule
mod rusti {
#[abi = "rust-intrinsic"]
extern "rust-intrinsic" {
pub fn pref_align_of<T>() -> uint;
pub fn min_align_of<T>() -> uint;

View file

@ -9,7 +9,6 @@
// except according to those terms.
mod rusti {
#[abi = "rust-intrinsic"]
extern "rust-intrinsic" {
pub fn atomic_cxchg(dst: &mut int, old: int, src: int) -> int;
pub fn atomic_cxchg_acq(dst: &mut int, old: int, src: int) -> int;

View file

@ -11,7 +11,6 @@
// xfail-fast
mod rusti {
#[abi = "rust-intrinsic"]
extern "rust-intrinsic" {
pub fn frame_address(f: &once fn(*u8));
}

View file

@ -9,7 +9,6 @@
// except according to those terms.
mod rusti {
#[abi = "rust-intrinsic"]
extern "rust-intrinsic" {
pub fn move_val_init<T>(dst: &mut T, src: T);
pub fn move_val<T>(dst: &mut T, src: T);

View file

@ -9,7 +9,6 @@
// except according to those terms.
mod rusti {
#[abi = "rust-intrinsic"]
extern "rust-intrinsic" {
pub fn uninit<T>() -> T;
}

View file

@ -15,7 +15,6 @@
extern mod extra;
mod rusti {
#[abi = "rust-intrinsic"]
extern "rust-intrinsic" {
pub fn ctpop8(x: i8) -> i8;
pub fn ctpop16(x: i16) -> i16;

View file

@ -13,7 +13,6 @@
#[feature(globs)];
mod rusti {
#[abi = "rust-intrinsic"]
extern "rust-intrinsic" {
pub fn sqrtf32(x: f32) -> f32;
pub fn sqrtf64(x: f64) -> f64;

View file

@ -30,8 +30,7 @@ mod m {
use std::libc::{c_double, c_int};
#[link_name = "m"]
#[abi = "cdecl"]
extern {
extern "cdecl" {
#[cfg(unix)]
#[link_name="lgamma_r"]
pub fn lgamma(n: c_double, sign: &mut c_int) -> c_double;

View file

@ -39,8 +39,7 @@ mod test_single_attr_outer {
pub mod rustrt {
#[attr = "val"]
#[abi = "cdecl"]
extern {}
extern "cdecl" {}
}
}
@ -60,8 +59,7 @@ mod test_multi_attr_outer {
pub mod rustrt {
#[attr1 = "val"]
#[attr2 = "val"]
#[abi = "cdecl"]
extern {}
extern "cdecl" {}
}
#[attr1 = "val"]
@ -83,8 +81,7 @@ mod test_stmt_single_attr_outer {
mod rustrt {
#[attr = "val"]
#[abi = "cdecl"]
extern {
extern "cdecl" {
}
}
}
@ -110,8 +107,7 @@ mod test_stmt_multi_attr_outer {
pub mod rustrt {
#[attr1 = "val"]
#[attr2 = "val"]
#[abi = "cdecl"]
extern {
extern "cdecl" {
}
}
*/
@ -169,8 +165,7 @@ mod test_foreign_items {
pub mod rustrt {
use std::libc;
#[abi = "cdecl"]
extern {
extern "cdecl" {
#[attr];
#[attr]

View file

@ -10,7 +10,6 @@
mod rusti {
#[nolink]
#[abi = "rust-intrinsic"]
extern "rust-intrinsic" {
pub fn morestack_addr() -> *();
}

View file

@ -15,7 +15,6 @@
use std::sys;
mod rusti {
#[abi = "rust-intrinsic"]
extern "rust-intrinsic" {
pub fn pref_align_of<T>() -> uint;
pub fn min_align_of<T>() -> uint;

View file

@ -15,7 +15,6 @@
use std::sys;
mod rusti {
#[abi = "rust-intrinsic"]
extern "rust-intrinsic" {
pub fn pref_align_of<T>() -> uint;
pub fn min_align_of<T>() -> uint;

View file

@ -18,7 +18,6 @@ pub type BOOL = u8;
mod kernel32 {
use super::{HANDLE, DWORD, SIZE_T, LPVOID, BOOL};
#[abi = "stdcall"]
extern "stdcall" {
pub fn GetProcessHeap() -> HANDLE;
pub fn HeapAlloc(hHeap: HANDLE, dwFlags: DWORD, dwBytes: SIZE_T)