From 738cd00f1d3b40a4856785e5a96b2ca4b0cc4e7f Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Thu, 4 Oct 2012 14:09:42 -0700 Subject: [PATCH] rt: Remove CHECK_CLAIMS --- src/rt/rust.cpp | 8 -------- src/rt/rust_env.cpp | 2 -- src/rt/rust_env.h | 1 - src/rt/rust_globals.h | 4 ---- 4 files changed, 15 deletions(-) diff --git a/src/rt/rust.cpp b/src/rt/rust.cpp index 11e65347f11b..805ec37bfeae 100644 --- a/src/rt/rust.cpp +++ b/src/rt/rust.cpp @@ -67,11 +67,6 @@ command_line_args : public kernel_owned } }; -// A global that indicates whether Rust typestate claim statements should be -// executed Generated code will read this variable directly (I think). -// FIXME (#2670): This belongs somewhere else -int check_claims = 0; - void* global_crate_map = NULL; /** @@ -94,9 +89,6 @@ rust_start(uintptr_t main_fn, int argc, char **argv, void* crate_map) { update_log_settings(crate_map, env->logspec); - // Maybe turn on typestate claim checking - check_claims = env->check_claims; - rust_kernel *kernel = new rust_kernel(env); // Create the main scheduler and the main task diff --git a/src/rt/rust_env.cpp b/src/rt/rust_env.cpp index 4e653c8f9e63..268aca965d70 100644 --- a/src/rt/rust_env.cpp +++ b/src/rt/rust_env.cpp @@ -10,7 +10,6 @@ #define RUST_MIN_STACK "RUST_MIN_STACK" #define RUST_MAX_STACK "RUST_MAX_STACK" #define RUST_LOG "RUST_LOG" -#define CHECK_CLAIMS "CHECK_CLAIMS" #define DETAILED_LEAKS "DETAILED_LEAKS" #define RUST_SEED "RUST_SEED" #define RUST_POISON_ON_FREE "RUST_POISON_ON_FREE" @@ -114,7 +113,6 @@ load_env(int argc, char **argv) { env->min_stack_size = get_min_stk_size(); env->max_stack_size = get_max_stk_size(); env->logspec = copyenv(RUST_LOG); - env->check_claims = getenv(CHECK_CLAIMS) != NULL; env->detailed_leaks = getenv(DETAILED_LEAKS) != NULL; env->rust_seed = copyenv(RUST_SEED); env->poison_on_free = getenv(RUST_POISON_ON_FREE) != NULL; diff --git a/src/rt/rust_env.h b/src/rt/rust_env.h index 0e3af9eae60c..8a0ff4d1df18 100644 --- a/src/rt/rust_env.h +++ b/src/rt/rust_env.h @@ -9,7 +9,6 @@ struct rust_env { size_t min_stack_size; size_t max_stack_size; char* logspec; - bool check_claims; bool detailed_leaks; char* rust_seed; bool poison_on_free; diff --git a/src/rt/rust_globals.h b/src/rt/rust_globals.h index 84c5eca0afb6..ec60af87b6b2 100644 --- a/src/rt/rust_globals.h +++ b/src/rt/rust_globals.h @@ -69,10 +69,6 @@ extern "C" { #define FASTCALL #endif -/* Controls whether claims are turned into checks */ -/* Variable name must be kept consistent with trans.rs */ -extern "C" int check_claims; - #define CHECKED(call) \ { \ int res = (call); \