Skip to content

Commit abb6e8c

Browse files
committed
---
yaml --- r: 83093 b: refs/heads/auto c: 16fc6a6 h: refs/heads/master i: 83091: cd1f0bd v: v3
1 parent 6f3d254 commit abb6e8c

35 files changed

+57
-130
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 5b10781c7b95a182da7c85af80a706f4ca7a4b65
16+
refs/heads/auto: 16fc6a694cac35ce962e98e180354cbce6a72f54
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/doc/tutorial-ffi.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -415,21 +415,18 @@ fn main() {
415415

416416
Most foreign code exposes a C ABI, and Rust uses the platform's C calling convention by default when
417417
calling foreign functions. Some foreign functions, most notably the Windows API, use other calling
418-
conventions. Rust provides the `abi` attribute as a way to hint to the compiler which calling
419-
convention to use:
418+
conventions. Rust provides a way to tell the compiler which convention to use:
420419

421420
~~~~
422421
#[cfg(target_os = "win32")]
423-
#[abi = "stdcall"]
424422
#[link_name = "kernel32"]
425-
extern {
423+
extern "stdcall" {
426424
fn SetEnvironmentVariableA(n: *u8, v: *u8) -> int;
427425
}
428426
~~~~
429427

430-
The `abi` attribute applies to a foreign module (it cannot be applied to a single function within a
431-
module), and must be either `"cdecl"` or `"stdcall"`. The compiler may eventually support other
432-
calling conventions.
428+
This applies to the entire `extern` block, and must be either `"cdecl"` or
429+
`"stdcall"`. The compiler may eventually support other calling conventions.
433430

434431
# Interoperability with foreign code
435432

branches/auto/src/libextra/time.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ static NSEC_PER_SEC: i32 = 1_000_000_000_i32;
1919
pub mod rustrt {
2020
use super::Tm;
2121

22-
#[abi = "cdecl"]
23-
extern {
22+
extern "cdecl" {
2423
pub fn get_time(sec: &mut i64, nsec: &mut i32);
2524
pub fn precise_time_ns(ns: &mut u64);
2625
pub fn rust_tzset();

branches/auto/src/libextra/unicode.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,7 @@ pub mod icu {
162162

163163
// #[link_name = "icuuc"]
164164
#[link_args = "-licuuc"]
165-
#[abi = "cdecl"]
166-
extern {
165+
extern "cdecl" {
167166
pub fn u_hasBinaryProperty(c: UChar32, which: UProperty) -> UBool;
168167
pub fn u_isdigit(c: UChar32) -> UBool;
169168
pub fn u_islower(c: UChar32) -> UBool;

branches/auto/src/librustc/lib/llvm.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,7 @@ pub mod llvm {
300300

301301
#[link_args = "-Lrustllvm -lrustllvm"]
302302
#[link_name = "rustllvm"]
303-
#[abi = "cdecl"]
304-
extern {
303+
extern "cdecl" {
305304
/* Create and destroy contexts. */
306305
pub fn LLVMContextCreate() -> ContextRef;
307306
pub fn LLVMContextDispose(C: ContextRef);

branches/auto/src/libstd/io.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,8 @@ pub type fd_t = c_int;
7676
pub mod rustrt {
7777
use libc;
7878

79-
#[abi = "cdecl"]
8079
#[link_name = "rustrt"]
81-
extern {
80+
extern "cdecl" {
8281
pub fn rust_get_stdin() -> *libc::FILE;
8382
pub fn rust_get_stdout() -> *libc::FILE;
8483
pub fn rust_get_stderr() -> *libc::FILE;

0 commit comments

Comments
 (0)