about summary refs log tree commit diff
path: root/doc/tutorial-ffi.md
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-10-14 07:26:47 -0700
committerbors <bors@rust-lang.org>2013-10-14 07:26:47 -0700
commitc8e77d5586aed50821e0b9361b2e24c96ade816c (patch)
treefe5ccc6b0b4ccbbd70cf48925e22cccf3d3c0a72 /doc/tutorial-ffi.md
parentb571039021e031888cea4e0b53d8f9b4e81c6d31 (diff)
parent309ab958e6cf78caf188f6dcbf9ce35d9ba62468 (diff)
auto merge of #9606 : steveklabnik/rust/abi_removal, r=alexcrichton
They've been replaced by putting the name on the extern block.

  #[abi = "foo"]

goes to

  extern "foo" { }

Closes #9483.
Diffstat (limited to 'doc/tutorial-ffi.md')
-rw-r--r--doc/tutorial-ffi.md11
1 files changed, 4 insertions, 7 deletions
diff --git a/doc/tutorial-ffi.md b/doc/tutorial-ffi.md
index 46d37a559bb..38aea02f040 100644
--- a/doc/tutorial-ffi.md
+++ b/doc/tutorial-ffi.md
@@ -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