Skip to content

Commit 738cd00

Browse files
committed
rt: Remove CHECK_CLAIMS
1 parent f05bf26 commit 738cd00

File tree

4 files changed

+0
-15
lines changed

4 files changed

+0
-15
lines changed

src/rt/rust.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,6 @@ command_line_args : public kernel_owned<command_line_args>
6767
}
6868
};
6969

70-
// A global that indicates whether Rust typestate claim statements should be
71-
// executed Generated code will read this variable directly (I think).
72-
// FIXME (#2670): This belongs somewhere else
73-
int check_claims = 0;
74-
7570
void* global_crate_map = NULL;
7671

7772
/**
@@ -94,9 +89,6 @@ rust_start(uintptr_t main_fn, int argc, char **argv, void* crate_map) {
9489

9590
update_log_settings(crate_map, env->logspec);
9691

97-
// Maybe turn on typestate claim checking
98-
check_claims = env->check_claims;
99-
10092
rust_kernel *kernel = new rust_kernel(env);
10193

10294
// Create the main scheduler and the main task

src/rt/rust_env.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#define RUST_MIN_STACK "RUST_MIN_STACK"
1111
#define RUST_MAX_STACK "RUST_MAX_STACK"
1212
#define RUST_LOG "RUST_LOG"
13-
#define CHECK_CLAIMS "CHECK_CLAIMS"
1413
#define DETAILED_LEAKS "DETAILED_LEAKS"
1514
#define RUST_SEED "RUST_SEED"
1615
#define RUST_POISON_ON_FREE "RUST_POISON_ON_FREE"
@@ -114,7 +113,6 @@ load_env(int argc, char **argv) {
114113
env->min_stack_size = get_min_stk_size();
115114
env->max_stack_size = get_max_stk_size();
116115
env->logspec = copyenv(RUST_LOG);
117-
env->check_claims = getenv(CHECK_CLAIMS) != NULL;
118116
env->detailed_leaks = getenv(DETAILED_LEAKS) != NULL;
119117
env->rust_seed = copyenv(RUST_SEED);
120118
env->poison_on_free = getenv(RUST_POISON_ON_FREE) != NULL;

src/rt/rust_env.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ struct rust_env {
99
size_t min_stack_size;
1010
size_t max_stack_size;
1111
char* logspec;
12-
bool check_claims;
1312
bool detailed_leaks;
1413
char* rust_seed;
1514
bool poison_on_free;

src/rt/rust_globals.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,6 @@ extern "C" {
6969
#define FASTCALL
7070
#endif
7171

72-
/* Controls whether claims are turned into checks */
73-
/* Variable name must be kept consistent with trans.rs */
74-
extern "C" int check_claims;
75-
7672
#define CHECKED(call) \
7773
{ \
7874
int res = (call); \

0 commit comments

Comments
 (0)