about summary refs log tree commit diff
path: root/src/test/run-pass
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2012-07-03 16:11:00 -0700
committerGraydon Hoare <graydon@mozilla.com>2012-07-03 16:11:00 -0700
commitdebb7e4641af2ea71cf8733b3f071d614803dcbd (patch)
tree3c087869d79d340300a1383b95b994b2fce43517 /src/test/run-pass
parent7259195caff1fdcce6266e6ecf51c0fd614e041f (diff)
downloadrust-debb7e4641af2ea71cf8733b3f071d614803dcbd.tar.gz
rust-debb7e4641af2ea71cf8733b3f071d614803dcbd.zip
Switch 'native' to 'extern' (or 'foreign' in some descriptions)
Diffstat (limited to 'src/test/run-pass')
-rw-r--r--src/test/run-pass/binops.rs2
-rw-r--r--src/test/run-pass/c-stack-as-value.rs2
-rw-r--r--src/test/run-pass/c-stack-returning-int64.rs2
-rw-r--r--src/test/run-pass/class-dtor.rs4
-rw-r--r--src/test/run-pass/conditional-compile.rs6
-rw-r--r--src/test/run-pass/crust-call-deep.rs2
-rw-r--r--src/test/run-pass/crust-call-deep2.rs2
-rw-r--r--src/test/run-pass/crust-call-scrub.rs2
-rw-r--r--src/test/run-pass/crust-call.rs2
-rw-r--r--src/test/run-pass/crust-stress.rs2
-rw-r--r--src/test/run-pass/crust-yield.rs2
-rw-r--r--src/test/run-pass/expr-block-fn.rs2
-rw-r--r--src/test/run-pass/fixed-point-bind-box.rs4
-rw-r--r--src/test/run-pass/fixed-point-bind-unique.rs4
-rw-r--r--src/test/run-pass/fn-bare-assign.rs2
-rw-r--r--src/test/run-pass/fn-bare-spawn.rs2
-rw-r--r--src/test/run-pass/fn-lval.rs2
-rw-r--r--src/test/run-pass/foreign-dupe.rs (renamed from src/test/run-pass/native-dupe.rs)4
-rw-r--r--src/test/run-pass/foreign-fn-linkname.rs (renamed from src/test/run-pass/native-fn-linkname.rs)2
-rw-r--r--src/test/run-pass/foreign-lib-path.rs (renamed from src/test/run-pass/native-lib-path.rs)4
-rw-r--r--src/test/run-pass/foreign-mod-src/inner.rs (renamed from src/test/run-pass/native-mod-src/inner.rs)0
-rw-r--r--src/test/run-pass/foreign-mod.rc (renamed from src/test/run-pass/native-mod.rc)0
-rw-r--r--src/test/run-pass/foreign-no-abi.rs (renamed from src/test/run-pass/native-no-abi.rs)2
-rw-r--r--src/test/run-pass/foreign-src/foreign.rs9
-rw-r--r--src/test/run-pass/foreign-struct.rs (renamed from src/test/run-pass/native-struct.rs)2
-rw-r--r--src/test/run-pass/foreign.rc (renamed from src/test/run-pass/native.rc)0
-rw-r--r--src/test/run-pass/foreign2.rs (renamed from src/test/run-pass/native2.rs)10
-rw-r--r--src/test/run-pass/fun-indirect-call.rs2
-rw-r--r--src/test/run-pass/generic-temporary.rs8
-rw-r--r--src/test/run-pass/hashmap-memory.rs2
-rw-r--r--src/test/run-pass/import-from-foreign.rs (renamed from src/test/run-pass/import-from-native.rs)2
-rw-r--r--src/test/run-pass/import-glob-1.rs2
-rw-r--r--src/test/run-pass/intrinsic-alignment.rs2
-rw-r--r--src/test/run-pass/intrinsic-atomics.rs2
-rw-r--r--src/test/run-pass/intrinsic-frame-address.rs2
-rw-r--r--src/test/run-pass/intrinsic-move-val.rs2
-rw-r--r--src/test/run-pass/issue-1251.rs2
-rw-r--r--src/test/run-pass/issue-1866.rs4
-rw-r--r--src/test/run-pass/issue-2214.rs2
-rw-r--r--src/test/run-pass/issue-506.rs2
-rw-r--r--src/test/run-pass/item-attributes.rs10
-rw-r--r--src/test/run-pass/morestack6.rs2
-rw-r--r--src/test/run-pass/native-src/native.rs9
-rw-r--r--src/test/run-pass/newtype.rs2
-rw-r--r--src/test/run-pass/nil-decl-in-foreign.rs (renamed from src/test/run-pass/nil-decl-in-native.rs)2
-rw-r--r--src/test/run-pass/rec-align-u32.rs2
-rw-r--r--src/test/run-pass/rec-align-u64.rs2
-rw-r--r--src/test/run-pass/resource-generic.rs4
-rw-r--r--src/test/run-pass/rt-sched-1.rs2
-rw-r--r--src/test/run-pass/sendfn-generic-fn.rs2
-rw-r--r--src/test/run-pass/struct-return.rs2
-rw-r--r--src/test/run-pass/tail-cps.rs4
-rw-r--r--src/test/run-pass/type-param.rs2
-rw-r--r--src/test/run-pass/type-params-in-for-each.rs2
-rw-r--r--src/test/run-pass/warn-ctypes-inhibit.rs2
-rw-r--r--src/test/run-pass/x86stdcall.rs2
-rw-r--r--src/test/run-pass/x86stdcall2.rs2
57 files changed, 82 insertions, 82 deletions
diff --git a/src/test/run-pass/binops.rs b/src/test/run-pass/binops.rs
index 155195b0428..7bae808504b 100644
--- a/src/test/run-pass/binops.rs
+++ b/src/test/run-pass/binops.rs
@@ -115,7 +115,7 @@ fn test_fn() {
 
 #[abi = "cdecl"]
 #[nolink]
-native mod test {
+extern mod test {
     fn unsupervise();
     fn get_task_id();
 }
diff --git a/src/test/run-pass/c-stack-as-value.rs b/src/test/run-pass/c-stack-as-value.rs
index e9de12921d3..1b10798166d 100644
--- a/src/test/run-pass/c-stack-as-value.rs
+++ b/src/test/run-pass/c-stack-as-value.rs
@@ -1,5 +1,5 @@
 #[abi = "cdecl"]
-native mod rustrt {
+extern mod rustrt {
     fn unsupervise();
 }
 
diff --git a/src/test/run-pass/c-stack-returning-int64.rs b/src/test/run-pass/c-stack-returning-int64.rs
index 162657d4190..4c7c2af982b 100644
--- a/src/test/run-pass/c-stack-returning-int64.rs
+++ b/src/test/run-pass/c-stack-returning-int64.rs
@@ -3,7 +3,7 @@ import str;
 
 #[abi = "cdecl"]
 #[nolink]
-native mod libc {
+extern mod libc {
     fn atol(x: *u8) -> int;
     fn atoll(x: *u8) -> i64;
 }
diff --git a/src/test/run-pass/class-dtor.rs b/src/test/run-pass/class-dtor.rs
index 8c539cd8328..f7d113cdbfc 100644
--- a/src/test/run-pass/class-dtor.rs
+++ b/src/test/run-pass/class-dtor.rs
@@ -1,7 +1,7 @@
 class cat {
-  let done : native fn(uint);
+  let done : extern fn(uint);
   let meows : uint;
-  new(done: native fn(uint)) {
+  new(done: extern fn(uint)) {
     self.meows = 0u;
     self.done = done;
   }
diff --git a/src/test/run-pass/conditional-compile.rs b/src/test/run-pass/conditional-compile.rs
index 70cf440949d..d1510e8de47 100644
--- a/src/test/run-pass/conditional-compile.rs
+++ b/src/test/run-pass/conditional-compile.rs
@@ -5,14 +5,14 @@ const b: bool = true;
 
 #[cfg(bogus)]
 #[abi = "cdecl"]
-native mod rustrt {
+extern mod rustrt {
     // This symbol doesn't exist and would be a link error if this
     // module was translated
     fn bogus();
 }
 
 #[abi = "cdecl"]
-native mod rustrt { }
+extern mod rustrt { }
 
 #[cfg(bogus)]
 type t = int;
@@ -81,7 +81,7 @@ fn test_in_fn_ctxt() {
 
 mod test_foreign_items {
     #[abi = "cdecl"]
-    native mod rustrt {
+    extern mod rustrt {
         #[cfg(bogus)]
         fn vec_from_buf_shared();
         fn vec_from_buf_shared();
diff --git a/src/test/run-pass/crust-call-deep.rs b/src/test/run-pass/crust-call-deep.rs
index 5a8a9fb285c..e3eb85a1a99 100644
--- a/src/test/run-pass/crust-call-deep.rs
+++ b/src/test/run-pass/crust-call-deep.rs
@@ -1,4 +1,4 @@
-native mod rustrt {
+extern mod rustrt {
     fn rust_dbg_call(cb: *u8,
                      data: libc::uintptr_t) -> libc::uintptr_t;
 }
diff --git a/src/test/run-pass/crust-call-deep2.rs b/src/test/run-pass/crust-call-deep2.rs
index ff6ee8ec35a..a4aa0dba441 100644
--- a/src/test/run-pass/crust-call-deep2.rs
+++ b/src/test/run-pass/crust-call-deep2.rs
@@ -1,4 +1,4 @@
-native mod rustrt {
+extern mod rustrt {
     fn rust_dbg_call(cb: *u8,
                      data: libc::uintptr_t) -> libc::uintptr_t;
 }
diff --git a/src/test/run-pass/crust-call-scrub.rs b/src/test/run-pass/crust-call-scrub.rs
index 3b2d0a4ba29..fe94af2b2e6 100644
--- a/src/test/run-pass/crust-call-scrub.rs
+++ b/src/test/run-pass/crust-call-scrub.rs
@@ -2,7 +2,7 @@
 // make sure the stack pointers are maintained properly in both
 // directions
 
-native mod rustrt {
+extern mod rustrt {
     fn rust_dbg_call(cb: *u8,
                      data: libc::uintptr_t) -> libc::uintptr_t;
 }
diff --git a/src/test/run-pass/crust-call.rs b/src/test/run-pass/crust-call.rs
index f81c0d302f0..1a4c7bce2a5 100644
--- a/src/test/run-pass/crust-call.rs
+++ b/src/test/run-pass/crust-call.rs
@@ -1,4 +1,4 @@
-native mod rustrt {
+extern mod rustrt {
     fn rust_dbg_call(cb: *u8,
                      data: libc::uintptr_t) -> libc::uintptr_t;
 }
diff --git a/src/test/run-pass/crust-stress.rs b/src/test/run-pass/crust-stress.rs
index 170dffdeb5e..fa28dc7217a 100644
--- a/src/test/run-pass/crust-stress.rs
+++ b/src/test/run-pass/crust-stress.rs
@@ -1,7 +1,7 @@
 // This creates a bunch of yielding tasks that run concurrently
 // while holding onto C stacks
 
-native mod rustrt {
+extern mod rustrt {
     fn rust_dbg_call(cb: *u8,
                      data: libc::uintptr_t) -> libc::uintptr_t;
 }
diff --git a/src/test/run-pass/crust-yield.rs b/src/test/run-pass/crust-yield.rs
index d6d6e9b0bd2..6d5da38ef31 100644
--- a/src/test/run-pass/crust-yield.rs
+++ b/src/test/run-pass/crust-yield.rs
@@ -1,4 +1,4 @@
-native mod rustrt {
+extern mod rustrt {
     fn rust_dbg_call(cb: *u8,
                      data: libc::uintptr_t) -> libc::uintptr_t;
 }
diff --git a/src/test/run-pass/expr-block-fn.rs b/src/test/run-pass/expr-block-fn.rs
index 19be1e81b66..9fbe930b7f7 100644
--- a/src/test/run-pass/expr-block-fn.rs
+++ b/src/test/run-pass/expr-block-fn.rs
@@ -1,7 +1,7 @@
 
 
 fn test_fn() {
-    type t = native fn() -> int;
+    type t = extern fn() -> int;
     fn ten() -> int { ret 10; }
     let rs: t = { ten };
     assert (rs() == 10);
diff --git a/src/test/run-pass/fixed-point-bind-box.rs b/src/test/run-pass/fixed-point-bind-box.rs
index a9d0e3e077d..7f1a983ce7b 100644
--- a/src/test/run-pass/fixed-point-bind-box.rs
+++ b/src/test/run-pass/fixed-point-bind-box.rs
@@ -1,8 +1,8 @@
-fn fix_help<A, B>(f: native fn(fn@(A) -> B, A) -> B, x: A) -> B {
+fn fix_help<A, B>(f: extern fn(fn@(A) -> B, A) -> B, x: A) -> B {
     ret f({|a|fix_help(f, a)}, x);
 }
 
-fn fix<A, B>(f: native fn(fn@(A) -> B, A) -> B) -> fn@(A) -> B {
+fn fix<A, B>(f: extern fn(fn@(A) -> B, A) -> B) -> fn@(A) -> B {
     ret {|a|fix_help(f, a)};
 }
 
diff --git a/src/test/run-pass/fixed-point-bind-unique.rs b/src/test/run-pass/fixed-point-bind-unique.rs
index 75315243a74..be9354d015a 100644
--- a/src/test/run-pass/fixed-point-bind-unique.rs
+++ b/src/test/run-pass/fixed-point-bind-unique.rs
@@ -1,8 +1,8 @@
-fn fix_help<A, B: send>(f: native fn(fn@(A) -> B, A) -> B, x: A) -> B {
+fn fix_help<A, B: send>(f: extern fn(fn@(A) -> B, A) -> B, x: A) -> B {
     ret f({|a|fix_help(f, a)}, x);
 }
 
-fn fix<A, B: send>(f: native fn(fn@(A) -> B, A) -> B) -> fn@(A) -> B {
+fn fix<A, B: send>(f: extern fn(fn@(A) -> B, A) -> B) -> fn@(A) -> B {
     ret {|a|fix_help(f, a)};
 }
 
diff --git a/src/test/run-pass/fn-bare-assign.rs b/src/test/run-pass/fn-bare-assign.rs
index 1b5504e8b86..ea1e0ee7e37 100644
--- a/src/test/run-pass/fn-bare-assign.rs
+++ b/src/test/run-pass/fn-bare-assign.rs
@@ -3,7 +3,7 @@ fn f(i: int, &called: bool) {
     called = true;
 }
 
-fn g(f: native fn(int, &bool), &called: bool) {
+fn g(f: extern fn(int, &bool), &called: bool) {
     f(10, called);
 }
 
diff --git a/src/test/run-pass/fn-bare-spawn.rs b/src/test/run-pass/fn-bare-spawn.rs
index e05ceb809b8..4ad9b5090cc 100644
--- a/src/test/run-pass/fn-bare-spawn.rs
+++ b/src/test/run-pass/fn-bare-spawn.rs
@@ -1,6 +1,6 @@
 // This is what the signature to spawn should look like with bare functions
 
-fn spawn<T: send>(val: T, f: native fn(T)) {
+fn spawn<T: send>(val: T, f: extern fn(T)) {
     f(val);
 }
 
diff --git a/src/test/run-pass/fn-lval.rs b/src/test/run-pass/fn-lval.rs
index 6cf3cc456da..bc3eae6e707 100644
--- a/src/test/run-pass/fn-lval.rs
+++ b/src/test/run-pass/fn-lval.rs
@@ -2,7 +2,7 @@
 
 
 // -*- rust -*-
-fn foo(f: native fn(int) -> int) { }
+fn foo(f: extern fn(int) -> int) { }
 
 fn id(x: int) -> int { ret x; }
 
diff --git a/src/test/run-pass/native-dupe.rs b/src/test/run-pass/foreign-dupe.rs
index 139189f4b9c..ab6a7320e45 100644
--- a/src/test/run-pass/native-dupe.rs
+++ b/src/test/run-pass/foreign-dupe.rs
@@ -3,13 +3,13 @@
 
 #[abi = "cdecl"]
 #[link_name = "rustrt"]
-native mod rustrt1 {
+extern mod rustrt1 {
     fn last_os_error() -> str;
 }
 
 #[abi = "cdecl"]
 #[link_name = "rustrt"]
-native mod rustrt2 {
+extern mod rustrt2 {
     fn last_os_error() -> str;
 }
 
diff --git a/src/test/run-pass/native-fn-linkname.rs b/src/test/run-pass/foreign-fn-linkname.rs
index e25b34e4fd3..46fa8cf97cd 100644
--- a/src/test/run-pass/native-fn-linkname.rs
+++ b/src/test/run-pass/foreign-fn-linkname.rs
@@ -5,7 +5,7 @@ import str;
 
 #[nolink]
 #[abi = "cdecl"]
-native mod libc {
+extern mod libc {
     #[link_name = "strlen"]
     fn my_strlen(str: *u8) -> uint;
 }
diff --git a/src/test/run-pass/native-lib-path.rs b/src/test/run-pass/foreign-lib-path.rs
index 288be15c385..99bf3c714f9 100644
--- a/src/test/run-pass/native-lib-path.rs
+++ b/src/test/run-pass/foreign-lib-path.rs
@@ -1,11 +1,11 @@
 // xfail-test FIXME I don't know how to test this (#2604)
 // compile-flags:-L.
-// The -L flag is also used for linking native libraries
+// The -L flag is also used for linking foreign libraries
 
 // FIXME: I want to name a mod that would not link successfully
 // wouthout providing a -L argument to the compiler, and that
 // will also be found successfully at runtime.
-native mod WHATGOESHERE {
+extern mod WHATGOESHERE {
     fn IDONTKNOW() -> u32;
 }
 
diff --git a/src/test/run-pass/native-mod-src/inner.rs b/src/test/run-pass/foreign-mod-src/inner.rs
index bee820cf3be..bee820cf3be 100644
--- a/src/test/run-pass/native-mod-src/inner.rs
+++ b/src/test/run-pass/foreign-mod-src/inner.rs
diff --git a/src/test/run-pass/native-mod.rc b/src/test/run-pass/foreign-mod.rc
index fe65719092e..fe65719092e 100644
--- a/src/test/run-pass/native-mod.rc
+++ b/src/test/run-pass/foreign-mod.rc
diff --git a/src/test/run-pass/native-no-abi.rs b/src/test/run-pass/foreign-no-abi.rs
index 615a139300e..6b853b7d0d2 100644
--- a/src/test/run-pass/native-no-abi.rs
+++ b/src/test/run-pass/foreign-no-abi.rs
@@ -1,6 +1,6 @@
 // ABI is cdecl by default
 
-native mod rustrt {
+extern mod rustrt {
     fn unsupervise();
 }
 
diff --git a/src/test/run-pass/foreign-src/foreign.rs b/src/test/run-pass/foreign-src/foreign.rs
new file mode 100644
index 00000000000..b8ecacaa695
--- /dev/null
+++ b/src/test/run-pass/foreign-src/foreign.rs
@@ -0,0 +1,9 @@
+
+
+
+// -*- rust -*-
+fn main() {
+    libc.puts(rustrt.str_buf("hello, extern world 1"));
+    libc.puts(rustrt.str_buf("hello, extern world 2"));
+    libc.puts(rustrt.str_buf("hello, extern world 3"));
+}
diff --git a/src/test/run-pass/native-struct.rs b/src/test/run-pass/foreign-struct.rs
index 8f8ddae2a5f..f88f47dd981 100644
--- a/src/test/run-pass/native-struct.rs
+++ b/src/test/run-pass/foreign-struct.rs
@@ -4,7 +4,7 @@
 enum void { }
 
 #[nolink]
-native mod bindgen {
+extern mod bindgen {
     fn printf(++v: void);
 }
 
diff --git a/src/test/run-pass/native.rc b/src/test/run-pass/foreign.rc
index 18993397002..18993397002 100644
--- a/src/test/run-pass/native.rc
+++ b/src/test/run-pass/foreign.rc
diff --git a/src/test/run-pass/native2.rs b/src/test/run-pass/foreign2.rs
index 377d7310375..b801051d4f6 100644
--- a/src/test/run-pass/native2.rs
+++ b/src/test/run-pass/foreign2.rs
@@ -1,27 +1,27 @@
 
 
 #[abi = "cdecl"]
-native mod rustrt {
+extern mod rustrt {
     fn unsupervise();
 }
 
 #[abi = "cdecl"]
 #[nolink]
-native mod bar { }
+extern mod bar { }
 
 #[abi = "cdecl"]
 #[nolink]
-native mod zed { }
+extern mod zed { }
 
 #[abi = "cdecl"]
 #[nolink]
-native mod libc {
+extern mod libc {
     fn write(fd: int, buf: *u8,
              count: core::libc::size_t) -> core::libc::ssize_t;
 }
 
 #[abi = "cdecl"]
 #[nolink]
-native mod baz { }
+extern mod baz { }
 
 fn main(args: ~[str]) { }
diff --git a/src/test/run-pass/fun-indirect-call.rs b/src/test/run-pass/fun-indirect-call.rs
index c97411fe5b1..e89378fe1b5 100644
--- a/src/test/run-pass/fun-indirect-call.rs
+++ b/src/test/run-pass/fun-indirect-call.rs
@@ -5,7 +5,7 @@
 fn f() -> int { ret 42; }
 
 fn main() {
-    let g: native fn() -> int = f;
+    let g: extern fn() -> int = f;
     let i: int = g();
     assert (i == 42);
 }
diff --git a/src/test/run-pass/generic-temporary.rs b/src/test/run-pass/generic-temporary.rs
index 108f9f8e34b..29a1a4482f7 100644
--- a/src/test/run-pass/generic-temporary.rs
+++ b/src/test/run-pass/generic-temporary.rs
@@ -4,13 +4,13 @@ fn mk() -> int { ret 1; }
 
 fn chk(&&a: int) { log(debug, a); assert (a == 1); }
 
-fn apply<T>(produce: native fn() -> T,
-            consume: native fn(T)) {
+fn apply<T>(produce: extern fn() -> T,
+            consume: extern fn(T)) {
     consume(produce());
 }
 
 fn main() {
-    let produce: native fn() -> int = mk;
-    let consume: native fn(&&int) = chk;
+    let produce: extern fn() -> int = mk;
+    let consume: extern fn(&&int) = chk;
     apply::<int>(produce, consume);
 }
diff --git a/src/test/run-pass/hashmap-memory.rs b/src/test/run-pass/hashmap-memory.rs
index 0d59e7d1e34..212a6febef5 100644
--- a/src/test/run-pass/hashmap-memory.rs
+++ b/src/test/run-pass/hashmap-memory.rs
@@ -29,7 +29,7 @@ mod map_reduce {
 
     type putter = fn@(str, str);
 
-    type mapper = native fn(str, putter);
+    type mapper = extern fn(str, putter);
 
     enum ctrl_proto { find_reducer(~[u8], chan<int>), mapper_done, }
 
diff --git a/src/test/run-pass/import-from-native.rs b/src/test/run-pass/import-from-foreign.rs
index af191426820..51cd4ea4984 100644
--- a/src/test/run-pass/import-from-native.rs
+++ b/src/test/run-pass/import-from-foreign.rs
@@ -4,7 +4,7 @@ mod spam {
 }
 
 #[abi = "cdecl"]
-native mod rustrt {
+extern mod rustrt {
     import spam::{ham, eggs};
     export ham;
     export eggs;
diff --git a/src/test/run-pass/import-glob-1.rs b/src/test/run-pass/import-glob-1.rs
index 5542f3b633a..6415836988b 100644
--- a/src/test/run-pass/import-glob-1.rs
+++ b/src/test/run-pass/import-glob-1.rs
@@ -22,7 +22,7 @@ mod a2 {
     //   |   |   |
     #[abi = "cdecl"]
     #[nolink]
-    native mod b1 {
+    extern mod b1 {
         //   |   |   |
         import a1::b2::*;
         //   | <-/  -/
diff --git a/src/test/run-pass/intrinsic-alignment.rs b/src/test/run-pass/intrinsic-alignment.rs
index bc1d75172f0..d379693de8c 100644
--- a/src/test/run-pass/intrinsic-alignment.rs
+++ b/src/test/run-pass/intrinsic-alignment.rs
@@ -1,7 +1,7 @@
 // xfail-fast Does not work with main in a submodule
 
 #[abi = "rust-intrinsic"]
-native mod rusti {
+extern mod rusti {
     fn pref_align_of<T>() -> uint;
     fn min_align_of<T>() -> uint;
 }
diff --git a/src/test/run-pass/intrinsic-atomics.rs b/src/test/run-pass/intrinsic-atomics.rs
index d2418abcb77..5170e5b407b 100644
--- a/src/test/run-pass/intrinsic-atomics.rs
+++ b/src/test/run-pass/intrinsic-atomics.rs
@@ -1,5 +1,5 @@
 #[abi = "rust-intrinsic"]
-native mod rusti {
+extern mod rusti {
     fn atomic_xchng(&dst: int, src: int) -> int;
     fn atomic_xchng_acq(&dst: int, src: int) -> int;
     fn atomic_xchng_rel(&dst: int, src: int) -> int;
diff --git a/src/test/run-pass/intrinsic-frame-address.rs b/src/test/run-pass/intrinsic-frame-address.rs
index 6af3c7555d0..31ea745d162 100644
--- a/src/test/run-pass/intrinsic-frame-address.rs
+++ b/src/test/run-pass/intrinsic-frame-address.rs
@@ -1,5 +1,5 @@
 #[abi = "rust-intrinsic"]
-native mod rusti {
+extern mod rusti {
     fn frame_address(f: fn(*u8));
 }
 
diff --git a/src/test/run-pass/intrinsic-move-val.rs b/src/test/run-pass/intrinsic-move-val.rs
index e47aa36a777..80dcf2a4199 100644
--- a/src/test/run-pass/intrinsic-move-val.rs
+++ b/src/test/run-pass/intrinsic-move-val.rs
@@ -1,5 +1,5 @@
 #[abi = "rust-intrinsic"]
-native mod rusti {
+extern mod rusti {
     fn move_val_init<T>(&dst: T, -src: T);
     fn move_val<T>(&dst: T, -src: T);
 }
diff --git a/src/test/run-pass/issue-1251.rs b/src/test/run-pass/issue-1251.rs
index 69e54f4a95d..0a73daa234d 100644
--- a/src/test/run-pass/issue-1251.rs
+++ b/src/test/run-pass/issue-1251.rs
@@ -1,6 +1,6 @@
 #[link(name = "unsupervise")];
 
-native mod rustrt {
+extern mod rustrt {
       fn unsupervise();
 }
 
diff --git a/src/test/run-pass/issue-1866.rs b/src/test/run-pass/issue-1866.rs
index 8035ad5f038..c7219fbc2d9 100644
--- a/src/test/run-pass/issue-1866.rs
+++ b/src/test/run-pass/issue-1866.rs
@@ -1,14 +1,14 @@
 // xfail-test
 mod a {
     type rust_task = uint;
-    native mod rustrt {
+    extern mod rustrt {
         fn rust_task_is_unwinding(rt: *rust_task) -> bool;
     }
 }
 
 mod b {
     type rust_task = bool;
-    native mod rustrt {
+    extern mod rustrt {
         fn rust_task_is_unwinding(rt: *rust_task) -> bool;
     }
 }
diff --git a/src/test/run-pass/issue-2214.rs b/src/test/run-pass/issue-2214.rs
index 6795375e869..7847ef3c8e0 100644
--- a/src/test/run-pass/issue-2214.rs
+++ b/src/test/run-pass/issue-2214.rs
@@ -7,7 +7,7 @@ fn lgamma(n: c_double, value: &mut int) -> c_double {
 
 #[link_name = "m"]
 #[abi = "cdecl"]
-native mod m {
+extern mod m {
     #[cfg(unix)]
     #[link_name="lgamma_r"] fn lgamma(n: c_double, sign: &mut c_int)
       -> c_double;
diff --git a/src/test/run-pass/issue-506.rs b/src/test/run-pass/issue-506.rs
index 458a0b12698..1c73de5b0c8 100644
--- a/src/test/run-pass/issue-506.rs
+++ b/src/test/run-pass/issue-506.rs
@@ -6,7 +6,7 @@ use std;
 import task;
 
 #[abi = "cdecl"]
-native mod rustrt {
+extern mod rustrt {
     fn rust_task_allow_kill();
 }
 
diff --git a/src/test/run-pass/item-attributes.rs b/src/test/run-pass/item-attributes.rs
index 2f10b0ef1ff..bcb70aba648 100644
--- a/src/test/run-pass/item-attributes.rs
+++ b/src/test/run-pass/item-attributes.rs
@@ -30,7 +30,7 @@ mod test_single_attr_outer {
 
     #[attr = "val"]
     #[abi = "cdecl"]
-    native mod rustrt { }
+    extern mod rustrt { }
 }
 
 mod test_multi_attr_outer {
@@ -50,7 +50,7 @@ mod test_multi_attr_outer {
     #[attr1 = "val"]
     #[attr2 = "val"]
     #[abi = "cdecl"]
-    native mod rustrt { }
+    extern mod rustrt { }
 
     #[attr1 = "val"]
     #[attr2 = "val"]
@@ -74,7 +74,7 @@ mod test_stmt_single_attr_outer {
 
         #[attr = "val"]
         #[abi = "cdecl"]
-        native mod rustrt {
+        extern mod rustrt {
         }
         */
     }
@@ -101,7 +101,7 @@ mod test_stmt_multi_attr_outer {
         #[attr1 = "val"]
         #[attr2 = "val"]
         #[abi = "cdecl"]
-        native mod rustrt {
+        extern mod rustrt {
         }
         */
     }
@@ -159,7 +159,7 @@ mod test_other_forms {
 
 mod test_foreign_items {
     #[abi = "cdecl"]
-    native mod rustrt {
+    extern mod rustrt {
         #[attr];
 
         #[attr]
diff --git a/src/test/run-pass/morestack6.rs b/src/test/run-pass/morestack6.rs
index eb0f71e67ed..69a904e00cd 100644
--- a/src/test/run-pass/morestack6.rs
+++ b/src/test/run-pass/morestack6.rs
@@ -5,7 +5,7 @@ use std;
 import task;
 import std::rand;
 
-native mod rustrt {
+extern mod rustrt {
     fn debug_get_stk_seg() -> *u8;
 
     fn unsupervise();
diff --git a/src/test/run-pass/native-src/native.rs b/src/test/run-pass/native-src/native.rs
deleted file mode 100644
index 164c55d0e9f..00000000000
--- a/src/test/run-pass/native-src/native.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-// -*- rust -*-
-fn main() {
-    libc.puts(rustrt.str_buf("hello, native world 1"));
-    libc.puts(rustrt.str_buf("hello, native world 2"));
-    libc.puts(rustrt.str_buf("hello, native world 3"));
-}
diff --git a/src/test/run-pass/newtype.rs b/src/test/run-pass/newtype.rs
index 32fde0f4edc..f6a9be124f3 100644
--- a/src/test/run-pass/newtype.rs
+++ b/src/test/run-pass/newtype.rs
@@ -1,4 +1,4 @@
-enum mytype = {compute: native fn(mytype) -> int, val: int};
+enum mytype = {compute: extern fn(mytype) -> int, val: int};
 
 fn compute(i: mytype) -> int { ret i.val + 20; }
 
diff --git a/src/test/run-pass/nil-decl-in-native.rs b/src/test/run-pass/nil-decl-in-foreign.rs
index 126a1a371be..b35b81b11e2 100644
--- a/src/test/run-pass/nil-decl-in-native.rs
+++ b/src/test/run-pass/nil-decl-in-foreign.rs
@@ -1,6 +1,6 @@
 // Issue #901
 #[nolink]
-native mod libc {
+extern mod libc {
     fn printf(x: ());
 }
 fn main() { }
\ No newline at end of file
diff --git a/src/test/run-pass/rec-align-u32.rs b/src/test/run-pass/rec-align-u32.rs
index 89f3305bf79..3f109d78e52 100644
--- a/src/test/run-pass/rec-align-u32.rs
+++ b/src/test/run-pass/rec-align-u32.rs
@@ -2,7 +2,7 @@
 // Issue #2303
 
 #[abi = "rust-intrinsic"]
-native mod rusti {
+extern mod rusti {
     fn pref_align_of<T>() -> uint;
     fn min_align_of<T>() -> uint;
 }
diff --git a/src/test/run-pass/rec-align-u64.rs b/src/test/run-pass/rec-align-u64.rs
index 39646bb04e0..2476cf7d818 100644
--- a/src/test/run-pass/rec-align-u64.rs
+++ b/src/test/run-pass/rec-align-u64.rs
@@ -2,7 +2,7 @@
 // Issue #2303
 
 #[abi = "rust-intrinsic"]
-native mod rusti {
+extern mod rusti {
     fn pref_align_of<T>() -> uint;
     fn min_align_of<T>() -> uint;
 }
diff --git a/src/test/run-pass/resource-generic.rs b/src/test/run-pass/resource-generic.rs
index 2cc23c1daad..21fe5461789 100644
--- a/src/test/run-pass/resource-generic.rs
+++ b/src/test/run-pass/resource-generic.rs
@@ -1,6 +1,6 @@
 class finish<T: copy> {
-  let arg: {val: T, fin: native fn(T)};
-  new(arg: {val: T, fin: native fn(T)}) {
+  let arg: {val: T, fin: extern fn(T)};
+  new(arg: {val: T, fin: extern fn(T)}) {
     self.arg = arg;
   }
   drop { self.arg.fin(self.arg.val); }
diff --git a/src/test/run-pass/rt-sched-1.rs b/src/test/run-pass/rt-sched-1.rs
index 553ee0a88c1..a30b1964bda 100644
--- a/src/test/run-pass/rt-sched-1.rs
+++ b/src/test/run-pass/rt-sched-1.rs
@@ -8,7 +8,7 @@ type task_id = *libc::c_void;
 type task = *libc::c_void;
 type closure = *libc::c_void;
 
-native mod rustrt {
+extern mod rustrt {
     fn rust_new_sched(num_threads: libc::uintptr_t) -> sched_id;
     fn rust_get_sched_id() -> sched_id;
     fn rust_new_task_in_sched(id: sched_id) -> task_id;
diff --git a/src/test/run-pass/sendfn-generic-fn.rs b/src/test/run-pass/sendfn-generic-fn.rs
index ba56b12d8f7..bc8ecd7047a 100644
--- a/src/test/run-pass/sendfn-generic-fn.rs
+++ b/src/test/run-pass/sendfn-generic-fn.rs
@@ -23,7 +23,7 @@ fn test05_start(&&f: fn~(&&float, &&str) -> pair<float, str>) {
     assert q.b == "Ho";
 }
 
-fn spawn<A: copy, B: copy>(f: native fn(fn~(A,B)->pair<A,B>)) {
+fn spawn<A: copy, B: copy>(f: extern fn(fn~(A,B)->pair<A,B>)) {
     let arg = fn~(a: A, b: B) -> pair<A,B> {
         ret make_generic_record(a, b);
     };
diff --git a/src/test/run-pass/struct-return.rs b/src/test/run-pass/struct-return.rs
index 63385b8e4d5..34108f30f2d 100644
--- a/src/test/run-pass/struct-return.rs
+++ b/src/test/run-pass/struct-return.rs
@@ -2,7 +2,7 @@ type quad = { a: u64, b: u64, c: u64, d: u64 };
 type floats = { a: f64, b: u8, c: f64 };
 
 #[nolink]
-native mod rustrt {
+extern mod rustrt {
     fn debug_abi_1(++q: quad) -> quad;
     fn debug_abi_2(++f: floats) -> floats;
 }
diff --git a/src/test/run-pass/tail-cps.rs b/src/test/run-pass/tail-cps.rs
index a5cb9c6f5fa..c2d38c67aaf 100644
--- a/src/test/run-pass/tail-cps.rs
+++ b/src/test/run-pass/tail-cps.rs
@@ -6,13 +6,13 @@ fn checktrue(rs: bool) -> bool { assert (rs); ret true; }
 
 fn main() { let k = checktrue; evenk(42, k); oddk(45, k); }
 
-fn evenk(n: int, k: native fn(bool) -> bool) -> bool {
+fn evenk(n: int, k: extern fn(bool) -> bool) -> bool {
     #debug("evenk");
     log(debug, n);
     if n == 0 { ret k(true); } else { ret oddk(n - 1, k); }
 }
 
-fn oddk(n: int, k: native fn(bool) -> bool) -> bool {
+fn oddk(n: int, k: extern fn(bool) -> bool) -> bool {
     #debug("oddk");
     log(debug, n);
     if n == 0 { ret k(false); } else { ret evenk(n - 1, k); }
diff --git a/src/test/run-pass/type-param.rs b/src/test/run-pass/type-param.rs
index 4d5f4a2fd17..a2afde8d73f 100644
--- a/src/test/run-pass/type-param.rs
+++ b/src/test/run-pass/type-param.rs
@@ -1,5 +1,5 @@
 
 
-type lteq<T> = native fn(T) -> bool;
+type lteq<T> = extern fn(T) -> bool;
 
 fn main(args: ~[str]) { }
diff --git a/src/test/run-pass/type-params-in-for-each.rs b/src/test/run-pass/type-params-in-for-each.rs
index 5400faa1df5..bbaafa6770d 100644
--- a/src/test/run-pass/type-params-in-for-each.rs
+++ b/src/test/run-pass/type-params-in-for-each.rs
@@ -5,7 +5,7 @@ fn range(lo: uint, hi: uint, it: fn(uint)) {
     while lo_ < hi { it(lo_); lo_ += 1u; }
 }
 
-fn create_index<T>(index: ~[{a: T, b: uint}], hash_fn: native fn(T) -> uint) {
+fn create_index<T>(index: ~[{a: T, b: uint}], hash_fn: extern fn(T) -> uint) {
     range(0u, 256u, |_i| { let bucket: ~[T] = ~[]; } )
 }
 
diff --git a/src/test/run-pass/warn-ctypes-inhibit.rs b/src/test/run-pass/warn-ctypes-inhibit.rs
index d0df4228779..1ce376f07a4 100644
--- a/src/test/run-pass/warn-ctypes-inhibit.rs
+++ b/src/test/run-pass/warn-ctypes-inhibit.rs
@@ -3,7 +3,7 @@
 #[warn(no_ctypes)];
 
 #[nolink]
-native mod libc {
+extern mod libc {
     fn malloc(size: int) -> *u8;
 }
 
diff --git a/src/test/run-pass/x86stdcall.rs b/src/test/run-pass/x86stdcall.rs
index b9d9b84a526..31850801034 100644
--- a/src/test/run-pass/x86stdcall.rs
+++ b/src/test/run-pass/x86stdcall.rs
@@ -2,7 +2,7 @@
 // xfail-test
 
 #[cfg(target_os = "win32")]
-native "stdcall" mod kernel32 {
+extern "stdcall" mod kernel32 {
     fn SetLastError(err: uint);
     fn GetLastError() -> uint;
 }
diff --git a/src/test/run-pass/x86stdcall2.rs b/src/test/run-pass/x86stdcall2.rs
index e58656a73a4..423bafae452 100644
--- a/src/test/run-pass/x86stdcall2.rs
+++ b/src/test/run-pass/x86stdcall2.rs
@@ -6,7 +6,7 @@ type BOOL = u8;
 
 #[cfg(target_os = "win32")]
 #[abi = "stdcall"]
-native mod kernel32 {
+extern mod kernel32 {
        fn GetProcessHeap() -> HANDLE;
        fn HeapAlloc(hHeap: HANDLE, dwFlags: DWORD, dwBytes: SIZE_T) -> LPVOID;
        fn HeapFree(hHeap: HANDLE, dwFlags: DWORD, lpMem: LPVOID) -> BOOL;