about summary refs log tree commit diff
path: root/src/rt/rust_builtin.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-06-25 01:59:05 -0700
committerbors <bors@rust-lang.org>2013-06-25 01:59:05 -0700
commitb11346bb5d2659313eb96f3108137f01239785c9 (patch)
tree22512167bcef6503c310e87ca74c40a43fcef07c /src/rt/rust_builtin.cpp
parent5a089c252e1645c1b321c8b6811f89ae3fea4bd2 (diff)
parentb94f89fffc0c31a2e9048a824a66ff121c908818 (diff)
downloadrust-b11346bb5d2659313eb96f3108137f01239785c9.tar.gz
rust-b11346bb5d2659313eb96f3108137f01239785c9.zip
auto merge of #7291 : alexcrichton/rust/static-mut, r=huonw
This adds both `static mut` items and `static mut` foreign items. This involved changing far less code than I thought it was going to, but the tests seem to pass and the variables seem functional.

I'm more than willing to write more tests, so suggestions are welcome!

Closes #553
Diffstat (limited to 'src/rt/rust_builtin.cpp')
-rw-r--r--src/rt/rust_builtin.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp
index e476fa0ad5e..6ae5e978106 100644
--- a/src/rt/rust_builtin.cpp
+++ b/src/rt/rust_builtin.cpp
@@ -154,6 +154,16 @@ debug_abi_2(floats f) {
     return ff;
 }
 
+extern "C" int
+debug_static_mut;
+
+int debug_static_mut = 3;
+
+extern "C" void
+debug_static_mut_check_four() {
+    assert(debug_static_mut == 4);
+}
+
 /* Debug builtins for std::dbg. */
 
 static void