]> git.lizzy.rs Git - rust.git/commitdiff
Remove unused abi attributes.
authorSteve Klabnik <steve@steveklabnik.com>
Sun, 29 Sep 2013 14:46:26 +0000 (07:46 -0700)
committerSteve Klabnik <steve@steveklabnik.com>
Mon, 14 Oct 2013 11:10:36 +0000 (13:10 +0200)
They've been replaced by putting the name on the extern block.

  #[abi = "foo"]

goes to

  extern "foo" { }

Closes #9483.

34 files changed:
doc/tutorial-ffi.md
src/libextra/time.rs
src/libextra/unicode.rs
src/librustc/lib/llvm.rs
src/libstd/io.rs
src/libstd/libc.rs
src/libstd/num/cmath.rs
src/libstd/os.rs
src/libstd/rt/thread_local_storage.rs
src/libstd/unstable/intrinsics.rs
src/libsyntax/ext/expand.rs
src/test/auxiliary/anon-extern-mod-cross-crate-1.rs
src/test/auxiliary/cci_intrinsic.rs
src/test/compile-fail/foreign-unsafe-fn-called.rs
src/test/run-pass/anon-extern-mod.rs
src/test/run-pass/c-stack-as-value.rs
src/test/run-pass/c-stack-returning-int64.rs
src/test/run-pass/conditional-compile.rs
src/test/run-pass/foreign-dupe.rs
src/test/run-pass/foreign-fn-linkname.rs
src/test/run-pass/foreign2.rs
src/test/run-pass/intrinsic-alignment.rs
src/test/run-pass/intrinsic-atomics.rs
src/test/run-pass/intrinsic-frame-address.rs
src/test/run-pass/intrinsic-move-val.rs
src/test/run-pass/intrinsic-uninit.rs
src/test/run-pass/intrinsics-integer.rs
src/test/run-pass/intrinsics-math.rs
src/test/run-pass/issue-2214.rs
src/test/run-pass/item-attributes.rs
src/test/run-pass/morestack-address.rs
src/test/run-pass/rec-align-u32.rs
src/test/run-pass/rec-align-u64.rs
src/test/run-pass/x86stdcall2.rs

index 46d37a559bbebb8fdaf438a445d244551a10783c..38aea02f04082ab435eea446abd675a94775c58b 100644 (file)
@@ -415,21 +415,18 @@ fn main() {
 
 Most foreign code exposes a C ABI, and Rust uses the platform's C calling convention by default when
 calling foreign functions. Some foreign functions, most notably the Windows API, use other calling
-conventions. Rust provides the `abi` attribute as a way to hint to the compiler which calling
-convention to use:
+conventions. Rust provides a way to tell the compiler which convention to use:
 
 ~~~~
 #[cfg(target_os = "win32")]
-#[abi = "stdcall"]
 #[link_name = "kernel32"]
-extern {
+extern "stdcall" {
     fn SetEnvironmentVariableA(n: *u8, v: *u8) -> int;
 }
 ~~~~
 
-The `abi` attribute applies to a foreign module (it cannot be applied to a single function within a
-module), and must be either `"cdecl"` or `"stdcall"`. The compiler may eventually support other
-calling conventions.
+This applies to the entire `extern` block, and must be either `"cdecl"` or
+`"stdcall"`. The compiler may eventually support other calling conventions.
 
 # Interoperability with foreign code
 
index f2f4f96bc7a159d257bba4409553bce96f157bc7..a9f3c201b9b59065d7b49a9941806fbc458b5a81 100644 (file)
@@ -19,8 +19,7 @@
 pub mod rustrt {
     use super::Tm;
 
-    #[abi = "cdecl"]
-    extern {
+    extern "cdecl" {
         pub fn get_time(sec: &mut i64, nsec: &mut i32);
         pub fn precise_time_ns(ns: &mut u64);
         pub fn rust_tzset();
index 3957551c846399df89eb2641051280f2d88d5a3b..1f850032266688c73a9129f60e779a3aef495890 100644 (file)
@@ -162,8 +162,7 @@ pub mod libicu {
 
         // #[link_name = "icuuc"]
         #[link_args = "-licuuc"]
-        #[abi = "cdecl"]
-        extern {
+        extern "cdecl" {
             pub fn u_hasBinaryProperty(c: UChar32, which: UProperty) -> UBool;
             pub fn u_isdigit(c: UChar32) -> UBool;
             pub fn u_islower(c: UChar32) -> UBool;
index 787f8e60d653f7912a7a1d9d69f5cab862c9f200..6ad379377fcf8f3535f91e9280d4677e7a6ca188 100644 (file)
@@ -300,8 +300,7 @@ pub mod llvm {
 
     #[link_args = "-Lrustllvm -lrustllvm"]
     #[link_name = "rustllvm"]
-    #[abi = "cdecl"]
-    extern {
+    extern "cdecl" {
         /* Create and destroy contexts. */
         pub fn LLVMContextCreate() -> ContextRef;
         pub fn LLVMContextDispose(C: ContextRef);
index 791616d330e69d1523d5410191da85c25e9a4827..c3f4de20938f508c4fd9d999d89cb040b5649ee7 100644 (file)
@@ -76,9 +76,8 @@
 pub mod rustrt {
     use libc;
 
-    #[abi = "cdecl"]
     #[link_name = "rustrt"]
-    extern {
+    extern "cdecl" {
         pub fn rust_get_stdin() -> *libc::FILE;
         pub fn rust_get_stdout() -> *libc::FILE;
         pub fn rust_get_stderr() -> *libc::FILE;
index f579e12054bec3b761f06761c8cc9ba40ef15e0f..67df68df6e461d0c5c0322e91de487f82d5cdc3f 100644 (file)
@@ -2663,11 +2663,10 @@ pub mod funcs {
 
     pub mod c95 {
         #[nolink]
-        #[abi = "cdecl"]
         pub mod ctype {
             use libc::types::os::arch::c95::{c_char, c_int};
 
-            extern {
+            extern "cdecl" {
                 pub fn isalnum(c: c_int) -> c_int;
                 pub fn isalpha(c: c_int) -> c_int;
                 pub fn iscntrl(c: c_int) -> c_int;
@@ -2685,12 +2684,11 @@ pub mod ctype {
         }
 
         #[nolink]
-        #[abi = "cdecl"]
         pub mod stdio {
             use libc::types::common::c95::{FILE, c_void, fpos_t};
             use libc::types::os::arch::c95::{c_char, c_int, c_long, size_t};
 
-            extern {
+            extern "cdecl" {
                 pub fn fopen(filename: *c_char, mode: *c_char) -> *FILE;
                 pub fn freopen(filename: *c_char, mode: *c_char, file: *FILE)
                                -> *FILE;
@@ -2742,14 +2740,13 @@ pub fn fseek(stream: *FILE, offset: c_long, whence: c_int)
         }
 
         #[nolink]
-        #[abi = "cdecl"]
         pub mod stdlib {
             use libc::types::common::c95::c_void;
             use libc::types::os::arch::c95::{c_char, c_double, c_int};
             use libc::types::os::arch::c95::{c_long, c_uint, c_ulong};
             use libc::types::os::arch::c95::{size_t};
 
-            extern {
+            extern "cdecl" {
                 pub fn abs(i: c_int) -> c_int;
                 pub fn labs(i: c_long) -> c_long;
                 // Omitted: div, ldiv (return pub type incomplete).
@@ -2776,13 +2773,12 @@ pub fn strtoul(s: *c_char, endp: **c_char, base: c_int)
         }
 
         #[nolink]
-        #[abi = "cdecl"]
         pub mod string {
             use libc::types::common::c95::c_void;
             use libc::types::os::arch::c95::{c_char, c_int, size_t};
             use libc::types::os::arch::c95::{wchar_t};
 
-            extern {
+            extern "cdecl" {
                 pub fn strcpy(dst: *c_char, src: *c_char) -> *c_char;
                 pub fn strncpy(dst: *c_char, src: *c_char, n: size_t)
                                -> *c_char;
@@ -2826,12 +2822,11 @@ pub fn strncpy(dst: *c_char, src: *c_char, n: size_t)
     #[cfg(target_os = "win32")]
     pub mod posix88 {
         #[nolink]
-        #[abi = "cdecl"]
         pub mod stat_ {
             use libc::types::os::common::posix01::stat;
             use libc::types::os::arch::c95::{c_int, c_char};
 
-            extern {
+            extern "cdecl" {
                 #[link_name = "_chmod"]
                 pub fn chmod(path: *c_char, mode: c_int) -> c_int;
                 #[link_name = "_mkdir"]
@@ -2844,12 +2839,11 @@ pub mod stat_ {
         }
 
         #[nolink]
-        #[abi = "cdecl"]
         pub mod stdio {
             use libc::types::common::c95::FILE;
             use libc::types::os::arch::c95::{c_int, c_char};
 
-            extern {
+            extern "cdecl" {
                 #[link_name = "_popen"]
                 pub fn popen(command: *c_char, mode: *c_char) -> *FILE;
                 #[link_name = "_pclose"]
@@ -2862,10 +2856,9 @@ pub mod stdio {
         }
 
         #[nolink]
-        #[abi = "cdecl"]
         pub mod fcntl {
             use libc::types::os::arch::c95::{c_int, c_char};
-            extern {
+            extern "cdecl" {
                 #[link_name = "_open"]
                 pub fn open(path: *c_char, oflag: c_int, mode: c_int)
                             -> c_int;
@@ -2875,20 +2868,18 @@ pub fn open(path: *c_char, oflag: c_int, mode: c_int)
         }
 
         #[nolink]
-        #[abi = "cdecl"]
         pub mod dirent {
             // Not supplied at all.
         }
 
         #[nolink]
-        #[abi = "cdecl"]
         pub mod unistd {
             use libc::types::common::c95::c_void;
             use libc::types::os::arch::c95::{c_int, c_uint, c_char,
                                              c_long, size_t};
             use libc::types::os::arch::c99::intptr_t;
 
-            extern {
+            extern "cdecl" {
                 #[link_name = "_access"]
                 pub fn access(path: *c_char, amode: c_int) -> c_int;
                 #[link_name = "_chdir"]
@@ -2949,8 +2940,7 @@ pub mod stat_ {
             use libc::types::os::arch::posix88::mode_t;
 
             #[nolink]
-            #[abi = "cdecl"]
-            extern {
+            extern "cdecl" {
                 pub fn chmod(path: *c_char, mode: mode_t) -> c_int;
                 pub fn fchmod(fd: c_int, mode: mode_t) -> c_int;
 
@@ -2978,12 +2968,11 @@ pub mod stat_ {
         }
 
         #[nolink]
-        #[abi = "cdecl"]
         pub mod stdio {
             use libc::types::common::c95::FILE;
             use libc::types::os::arch::c95::{c_char, c_int};
 
-            extern {
+            extern "cdecl" {
                 pub fn popen(command: *c_char, mode: *c_char) -> *FILE;
                 pub fn pclose(stream: *FILE) -> c_int;
                 pub fn fdopen(fd: c_int, mode: *c_char) -> *FILE;
@@ -2992,12 +2981,11 @@ pub mod stdio {
         }
 
         #[nolink]
-        #[abi = "cdecl"]
         pub mod fcntl {
             use libc::types::os::arch::c95::{c_char, c_int};
             use libc::types::os::arch::posix88::mode_t;
 
-            extern {
+            extern "cdecl" {
                 pub fn open(path: *c_char, oflag: c_int, mode: c_int)
                             -> c_int;
                 pub fn creat(path: *c_char, mode: mode_t) -> c_int;
@@ -3006,7 +2994,6 @@ pub fn open(path: *c_char, oflag: c_int, mode: c_int)
         }
 
         #[nolink]
-        #[abi = "cdecl"]
         pub mod dirent {
             use libc::types::common::posix88::{DIR, dirent_t};
             use libc::types::os::arch::c95::{c_char, c_int, c_long};
@@ -3026,12 +3013,12 @@ pub unsafe fn readdir(dirp: *DIR) -> *dirent_t {
                 rust_readdir(dirp)
             }
 
-            extern {
+            extern "cdecl" {
                 fn rust_opendir(dirname: *c_char) -> *DIR;
                 fn rust_readdir(dirp: *DIR) -> *dirent_t;
             }
 
-            extern {
+            extern "cdecl" {
                 pub fn closedir(dirp: *DIR) -> c_int;
                 pub fn rewinddir(dirp: *DIR);
                 pub fn seekdir(dirp: *DIR, loc: c_long);
@@ -3040,7 +3027,6 @@ pub unsafe fn readdir(dirp: *DIR) -> *dirent_t {
         }
 
         #[nolink]
-        #[abi = "cdecl"]
         pub mod unistd {
             use libc::types::common::c95::c_void;
             use libc::types::os::arch::c95::{c_char, c_int, c_long, c_uint};
@@ -3048,7 +3034,7 @@ pub mod unistd {
             use libc::types::os::arch::posix88::{gid_t, off_t, pid_t};
             use libc::types::os::arch::posix88::{ssize_t, uid_t};
 
-            extern {
+            extern "cdecl" {
                 pub fn access(path: *c_char, amode: c_int) -> c_int;
                 pub fn alarm(seconds: c_uint) -> c_uint;
                 pub fn chdir(dir: *c_char) -> c_int;
@@ -3100,24 +3086,22 @@ pub fn write(fd: c_int, buf: *c_void, count: size_t)
         }
 
         #[nolink]
-        #[abi = "cdecl"]
         pub mod signal {
             use libc::types::os::arch::c95::{c_int};
             use libc::types::os::arch::posix88::{pid_t};
 
-            extern {
+            extern "cdecl" {
                 pub fn kill(pid: pid_t, sig: c_int) -> c_int;
             }
         }
 
         #[nolink]
-        #[abi = "cdecl"]
         pub mod mman {
             use libc::types::common::c95::{c_void};
             use libc::types::os::arch::c95::{size_t, c_int, c_char};
             use libc::types::os::arch::posix88::{mode_t, off_t};
 
-            extern {
+            extern "cdecl" {
                 pub fn mlock(addr: *c_void, len: size_t) -> c_int;
                 pub fn munlock(addr: *c_void, len: size_t) -> c_int;
                 pub fn mlockall(flags: c_int) -> c_int;
@@ -3150,12 +3134,11 @@ pub fn shm_open(name: *c_char, oflag: c_int, mode: mode_t)
     #[cfg(target_os = "freebsd")]
     pub mod posix01 {
         #[nolink]
-        #[abi = "cdecl"]
         pub mod stat_ {
             use libc::types::os::arch::c95::{c_char, c_int};
             use libc::types::os::arch::posix01::stat;
 
-            extern {
+            extern "cdecl" {
                 #[cfg(target_os = "linux")]
                 #[cfg(target_os = "freebsd")]
                 #[cfg(target_os = "android")]
@@ -3168,12 +3151,11 @@ pub mod stat_ {
         }
 
         #[nolink]
-        #[abi = "cdecl"]
         pub mod unistd {
             use libc::types::os::arch::c95::{c_char, c_int, size_t};
             use libc::types::os::arch::posix88::{ssize_t};
 
-            extern {
+            extern "cdecl" {
                 pub fn readlink(path: *c_char,
                                 buf: *mut c_char,
                                 bufsz: size_t)
@@ -3195,25 +3177,23 @@ pub fn setenv(name: *c_char, val: *c_char, overwrite: c_int)
         }
 
         #[nolink]
-        #[abi = "cdecl"]
         pub mod wait {
             use libc::types::os::arch::c95::{c_int};
             use libc::types::os::arch::posix88::{pid_t};
 
-            extern {
+            extern "cdecl" {
                 pub fn waitpid(pid: pid_t, status: *mut c_int, options: c_int)
                                -> pid_t;
             }
         }
 
         #[nolink]
-        #[abi = "cdecl"]
         pub mod glob {
             use libc::types::os::arch::c95::{c_char, c_int};
             use libc::types::os::common::posix01::{glob_t};
             use option::Option;
 
-            extern {
+            extern "cdecl" {
                 pub fn glob(pattern: *c_char,
                             flags: c_int,
                             errfunc: Option<extern "C" fn(epath: *c_char, errno: int) -> int>,
@@ -3223,12 +3203,11 @@ pub fn glob(pattern: *c_char,
         }
 
         #[nolink]
-        #[abi = "cdecl"]
         pub mod mman {
             use libc::types::common::c95::{c_void};
             use libc::types::os::arch::c95::{c_int, size_t};
 
-            extern {
+            extern "cdecl" {
                 pub fn posix_madvise(addr: *c_void,
                                      len: size_t,
                                      advice: c_int)
@@ -3271,8 +3250,7 @@ pub mod bsd44 {
         use libc::types::os::arch::c95::{c_char, c_uchar, c_int, c_uint,
                                          size_t};
 
-        #[abi = "cdecl"]
-        extern {
+        extern "cdecl" {
             pub fn sysctl(name: *c_int,
                           namelen: c_uint,
                           oldp: *mut c_void,
@@ -3305,8 +3283,7 @@ pub mod bsd44 {
         use libc::types::common::c95::{c_void};
         use libc::types::os::arch::c95::{c_uchar, c_int, size_t};
 
-        #[abi = "cdecl"]
-        extern {
+        extern "cdecl" {
             pub fn getdtablesize() -> c_int;
             pub fn madvise(addr: *c_void, len: size_t, advice: c_int)
                            -> c_int;
@@ -3325,8 +3302,7 @@ pub mod bsd44 {
     pub mod extra {
         use libc::types::os::arch::c95::{c_char, c_int};
 
-        #[abi = "cdecl"]
-        extern {
+        extern "cdecl" {
             pub fn _NSGetExecutablePath(buf: *mut c_char, bufsize: *mut u32)
                                         -> c_int;
         }
@@ -3358,7 +3334,6 @@ pub mod kernel32 {
             use libc::types::os::arch::extra::{HANDLE, LPHANDLE};
 
             #[cfg(target_arch = "x86")]
-            #[abi = "stdcall"]
             extern "stdcall" {
                 pub fn GetEnvironmentVariableW(n: LPCWSTR,
                                                v: LPWSTR,
@@ -3572,9 +3547,8 @@ pub fn MapViewOfFile(hFileMappingObject: HANDLE,
         pub mod msvcrt {
             use libc::types::os::arch::c95::{c_int, c_long};
 
-            #[abi = "cdecl"]
             #[nolink]
-            extern {
+            extern "cdecl" {
                 #[link_name = "_commit"]
                 pub fn commit(fd: c_int) -> c_int;
 
index 0c515538266d5cbc3f72b13d26c13605c0964af0..aed3601060b74084d1b5be53e5bae010d05e2cf7 100644 (file)
@@ -18,8 +18,7 @@ pub mod c_double_utils {
     use libc::{c_double, c_int};
 
     #[link_name = "m"]
-    #[abi = "cdecl"]
-    extern {
+    extern "cdecl" {
         // Alpabetically sorted by link_name
 
         pub fn acos(n: c_double) -> c_double;
@@ -107,8 +106,7 @@ pub mod c_float_utils {
     use libc::{c_float, c_int};
 
     #[link_name = "m"]
-    #[abi = "cdecl"]
-    extern {
+    extern "cdecl" {
         // Alpabetically sorted by link_name
 
         #[link_name="acosf"]
index e7cba0895e45125aa4bd9b73f28e23f1fec4cf75..b7921d7527b38f055bd88e474bedde8972c1a50c 100644 (file)
@@ -1039,7 +1039,6 @@ pub fn errno() -> uint {
 
     #[cfg(target_arch = "x86")]
     #[link_name = "kernel32"]
-    #[abi = "stdcall"]
     extern "stdcall" {
         fn GetLastError() -> DWORD;
     }
@@ -1118,7 +1117,6 @@ fn strerror() -> ~str {
 
         #[cfg(target_arch = "x86")]
         #[link_name = "kernel32"]
-        #[abi = "stdcall"]
         extern "stdcall" {
             fn FormatMessageW(flags: DWORD,
                               lpSrc: LPVOID,
index 26eabca2d9d1e53c6faf97a20c7ad5b851451828..cd89d09ffc0ab0d584c7bb56f626d5bb33a4b828 100644 (file)
@@ -84,7 +84,6 @@ pub unsafe fn get(key: Key) -> *mut c_void {
 }
 
 #[cfg(windows, target_arch = "x86")]
-#[abi = "stdcall"]
 extern "stdcall" {
        fn TlsAlloc() -> DWORD;
        fn TlsSetValue(dwTlsIndex: DWORD, lpTlsvalue: LPVOID) -> BOOL;
index 26ebde3477556ad518c89a1db963f19491a1c5d0..59b3c264b99f5541bb627677af4658940ce8fbe9 100644 (file)
@@ -170,7 +170,6 @@ fn visit_leave_fn(&mut self, purity: uint, proto: uint,
     fn visit_closure_ptr(&mut self, ck: uint) -> bool;
 }
 
-#[abi = "rust-intrinsic"]
 extern "rust-intrinsic" {
 
     /// Atomic compare and exchange, sequentially consistent.
index 01d0fd80672463dff20cd45e737f9b7bd93dd526..c936cb9ab908e983caa98e9b70f8d583d89b002c 100644 (file)
@@ -1059,7 +1059,6 @@ macro_rules! local_data_key (
     // It is intended to be used like:
     //
     // externfn!(#[nolink]
-    //           #[abi = \"cdecl\"]
     //           fn memcmp(cx: *u8, ct: *u8, n: u32) -> u32)
     //
     // Due to limitations in the macro parser, this pattern must be
index 3c73bd1b7f20e5778bd0b56e31d782e7b34b9c88..987648ca6f2e7e4b7e5c65884265a3dc996494c3 100644 (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;
 }
index ebcb1e7fef9d0d859acdaca17f2ff44fc24e5710..9e69715d1cb214d699cb04d0f340d7441e36ba53 100644 (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;
index 6c74c860a4b1df44d6060c6420303719d02cdd76..f6dca262d4c12126b8bada14e270a88a5096366f 100644 (file)
@@ -11,8 +11,7 @@
 
 
 mod test {
-    #[abi = "cdecl"]
-    extern {
+    extern "cdecl" {
         pub fn free();
     }
 }
index ed9caa1f65e2f52223ea868d95d5d7ac54a7ba3c..ef951de6c4df5e6d1c58efd48c910a7f1d9f9679 100644 (file)
@@ -10,9 +10,8 @@
 
 use std::libc;
 
-#[abi = "cdecl"]
 #[link_name = "rustrt"]
-extern {
+extern "cdecl" {
     fn rust_get_test_int() -> libc::intptr_t;
 }
 
index ac7b221cff81c181a9c2635ee9aba774c7e723e7..9a38702efbd58bb4481d49de6557a420bc9621e8 100644 (file)
@@ -11,8 +11,7 @@
 mod rustrt {
     use std::libc;
 
-    #[abi = "cdecl"]
-    extern {
+    extern "cdecl" {
         pub fn rust_get_test_int() -> libc::intptr_t;
     }
 }
index f140c4621aa27319cec5be3f064514d951d4b2b1..7d7f0fc23fec9db1d7fe1362aacd005fb39dde3f 100644 (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;
     }
index 00be4cd26f43a7823f227f6fb182a6ec83d04abf..dc10a0bbd7799249bb45daa30cdb03c59b4c0198 100644 (file)
 
 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 f() { }
 
 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;
index e8a9d666dcc0c2765236518fab87278789abfb15..793898058a1602f49c5ce22ea8cd54f5bbbc8624 100644 (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;
     }
 }
index 57b59e4445e7718800ffe80de19a24fdda7b90a0..d037feab452db36004d0424495173fe5a893d08b 100644 (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;
     }
index 2cc7e2707728408f0ad754d64e48ce7f58b7b841..654b3b7d43aaa8d747b7f101b162b517cf3bbc3e 100644 (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() { }
index 90d4bd1e7aecaf6eb5ed4d0db92116c14b6149bb..051f92b165108b1de4877b490e2b5ebe050dd60c 100644 (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;
index f1354cbb20f5da526f61c24f9d7509447919e61b..2ec91ee440b86969199acc839260b59c94e19741 100644 (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;
index 452104ec4a2aa3a8166f0d0e1406a87b2603c777..63635c7addfa000579a8784238ef2fae09c823cf 100644 (file)
@@ -11,7 +11,6 @@
 // xfail-fast
 
 mod rusti {
-    #[abi = "rust-intrinsic"]
     extern "rust-intrinsic" {
         pub fn frame_address(f: &once fn(*u8));
     }
index 90f352c845b5b742ad1cfaf8166361ee12108316..f328c4844781069aeb91ac615c00053e389e8306 100644 (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);
index 53c9ed631417cb7e5c1d3b36e60c199e94b46517..ab6904927e87065ff06378a5f0677a7e09fba272 100644 (file)
@@ -9,7 +9,6 @@
 // except according to those terms.
 
 mod rusti {
-    #[abi = "rust-intrinsic"]
     extern "rust-intrinsic" {
         pub fn uninit<T>() -> T;
     }
index 2ca71866db8e0d4a15d4412656ec07a00e69c888..e45472634e619737c9fb5b6e5d9a8bb16119cfbb 100644 (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;
index 281ca2c3424bb63b6b98297bd8d05fc15688054f..085ce6569083a97bd7bb4f5bb2704f71d05038a8 100644 (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;
index 1bb8a0008760b2ede0f90d6cdd9381ee03ce5259..298c4e7454d5f866db7d34b83955b7e782140861 100644 (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;
index e661fe7771ae0f1a39207d3ba41a4493fe2e7153..0266f6ea93054b57661ca05560e86aef862c0490 100644 (file)
@@ -39,8 +39,7 @@ pub mod mod1 {}
 
     pub mod rustrt {
         #[attr = "val"]
-        #[abi = "cdecl"]
-        extern {}
+        extern "cdecl" {}
     }
 }
 
@@ -60,8 +59,7 @@ pub mod mod1 {}
     pub mod rustrt {
         #[attr1 = "val"]
         #[attr2 = "val"]
-        #[abi = "cdecl"]
-        extern {}
+        extern "cdecl" {}
     }
 
     #[attr1 = "val"]
@@ -83,8 +81,7 @@ mod mod1 {
 
         mod rustrt {
             #[attr = "val"]
-            #[abi = "cdecl"]
-            extern {
+            extern "cdecl" {
             }
         }
     }
@@ -110,8 +107,7 @@ mod mod1 {
         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]
index cb4b078b9de2c2d2898652eb8efd843b059a46b9..ad8b32839ea4499fffbfd5283c4b8ce253454aea 100644 (file)
@@ -10,7 +10,6 @@
 
 mod rusti {
     #[nolink]
-    #[abi = "rust-intrinsic"]
     extern "rust-intrinsic" {
         pub fn morestack_addr() -> *();
     }
index b7a2330cf84f43e482e868a149aa9cebee3008ac..804e6902002123cdcf967e8da119d336101aa6f8 100644 (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;
index e833f67b51edc1561697b7044a14d94d72a214b1..6ec2b63cfff8ecf7a13dd32e6d5088d87dde6314 100644 (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;
index 3722dccf94b94001c38914056d6220fe9f082c47..b16218a59f982dd7ac3cd395ce58eb6c82866da8 100644 (file)
@@ -18,7 +18,6 @@
 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)