Skip to content

Commit 99c421f

Browse files
bogglebrson
authored andcommitted
Removed --no-typestate flag from rutsc
Fixes issue #1139
1 parent 02cebbb commit 99c421f

File tree

4 files changed

+3
-16
lines changed

4 files changed

+3
-16
lines changed

Makefile.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ endif
7979
ifdef TIME_LLVM_PASSES
8080
CFG_RUSTC_FLAGS += --time-llvm-passes
8181
endif
82-
ifdef NO_TYPESTATE
83-
CFG_RUSTC_FLAGS += --no-typestate
84-
endif
8582
ifdef DEBUG
8683
CFG_RUSTC_FLAGS += -g
8784
endif

man/rustc.1

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,6 @@ values include "i686-unknown-linux-gnu" and "mips-idt-ecoff"; see
115115
<\fBhttp://sources.redhat.com/autobook/autobook/autobook_17.html\fR>. If not
116116
supplied, the host triple is used (see \fB--version\fR output).
117117
.TP
118-
\fB--no-typestate\fR:
119-
Disable the typestate pass. This breaks some safety
120-
guarantees of the language and is quite dangerous.
121-
.TP
122118
\fB--test\fR:
123119
Build a test harness.
124120
.TP

src/comp/driver/rustc.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,8 @@ fn compile_input(sess: session::session, cfg: ast::crate_cfg, input: str,
142142
bind fn_usage::check_crate_fn_usage(ty_cx, crate));
143143
time(time_passes, "alt checking",
144144
bind middle::check_alt::check_crate(ty_cx, crate));
145-
if sess.get_opts().run_typestate {
146-
time(time_passes, "typestate checking",
147-
bind middle::tstate::ck::check_crate(ty_cx, crate));
148-
}
145+
time(time_passes, "typestate checking",
146+
bind middle::tstate::ck::check_crate(ty_cx, crate));
149147
let mut_map =
150148
time(time_passes, "mutability checking",
151149
bind middle::mut::check_crate(ty_cx, crate));
@@ -273,7 +271,6 @@ options:
273271
--time-llvm-passes time the individual phases of the LLVM backend
274272
--sysroot <path> override the system root
275273
--target <triple> target to compile for (default: host triple)
276-
--no-typestate don't run the typestate pass (unsafe!)
277274
--test build test harness
278275
--gc garbage collect shared data (experimental/temporary)
279276
--stack-growth perform stack checks (experimental)
@@ -363,7 +360,6 @@ fn build_session_options(match: getopts::match)
363360
let stats = opt_present(match, "stats");
364361
let time_passes = opt_present(match, "time-passes");
365362
let time_llvm_passes = opt_present(match, "time-llvm-passes");
366-
let run_typestate = !opt_present(match, "no-typestate");
367363
let sysroot_opt = getopts::opt_maybe_str(match, "sysroot");
368364
let target_opt = getopts::opt_maybe_str(match, "target");
369365
let no_asm_comments = getopts::opt_present(match, "no-asm-comments");
@@ -407,7 +403,6 @@ fn build_session_options(match: getopts::match)
407403
optimize: opt_level,
408404
debuginfo: debuginfo,
409405
verify: verify,
410-
run_typestate: run_typestate,
411406
save_temps: save_temps,
412407
stats: stats,
413408
time_passes: time_passes,
@@ -458,7 +453,7 @@ fn opts() -> [getopts::opt] {
458453
optflag("c"), optopt("o"), optflag("g"), optflag("save-temps"),
459454
optopt("sysroot"), optopt("target"), optflag("stats"),
460455
optflag("time-passes"), optflag("time-llvm-passes"),
461-
optflag("no-typestate"), optflag("noverify"),
456+
optflag("noverify"),
462457
optmulti("cfg"), optflag("test"),
463458
optflag("lib"), optflag("static"), optflag("gc"),
464459
optflag("stack-growth"), optflag("check-unsafe"),

src/comp/driver/session.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ type options =
2929
optimize: uint,
3030
debuginfo: bool,
3131
verify: bool,
32-
run_typestate: bool,
3332
save_temps: bool,
3433
stats: bool,
3534
time_passes: bool,

0 commit comments

Comments
 (0)