Skip to content

Commit

Permalink
Removed --no-typestate flag from rutsc
Browse files Browse the repository at this point in the history
Fixes issue rust-lang#1139
  • Loading branch information
boggle authored and brson committed Nov 17, 2011
1 parent 02cebbb commit 99c421f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 16 deletions.
3 changes: 0 additions & 3 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ endif
ifdef TIME_LLVM_PASSES
CFG_RUSTC_FLAGS += --time-llvm-passes
endif
ifdef NO_TYPESTATE
CFG_RUSTC_FLAGS += --no-typestate
endif
ifdef DEBUG
CFG_RUSTC_FLAGS += -g
endif
Expand Down
4 changes: 0 additions & 4 deletions man/rustc.1
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,6 @@ values include "i686-unknown-linux-gnu" and "mips-idt-ecoff"; see
<\fBhttp://sources.redhat.com/autobook/autobook/autobook_17.html\fR>. If not
supplied, the host triple is used (see \fB--version\fR output).
.TP
\fB--no-typestate\fR:
Disable the typestate pass. This breaks some safety
guarantees of the language and is quite dangerous.
.TP
\fB--test\fR:
Build a test harness.
.TP
Expand Down
11 changes: 3 additions & 8 deletions src/comp/driver/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,8 @@ fn compile_input(sess: session::session, cfg: ast::crate_cfg, input: str,
bind fn_usage::check_crate_fn_usage(ty_cx, crate));
time(time_passes, "alt checking",
bind middle::check_alt::check_crate(ty_cx, crate));
if sess.get_opts().run_typestate {
time(time_passes, "typestate checking",
bind middle::tstate::ck::check_crate(ty_cx, crate));
}
time(time_passes, "typestate checking",
bind middle::tstate::ck::check_crate(ty_cx, crate));
let mut_map =
time(time_passes, "mutability checking",
bind middle::mut::check_crate(ty_cx, crate));
Expand Down Expand Up @@ -273,7 +271,6 @@ options:
--time-llvm-passes time the individual phases of the LLVM backend
--sysroot <path> override the system root
--target <triple> target to compile for (default: host triple)
--no-typestate don't run the typestate pass (unsafe!)
--test build test harness
--gc garbage collect shared data (experimental/temporary)
--stack-growth perform stack checks (experimental)
Expand Down Expand Up @@ -363,7 +360,6 @@ fn build_session_options(match: getopts::match)
let stats = opt_present(match, "stats");
let time_passes = opt_present(match, "time-passes");
let time_llvm_passes = opt_present(match, "time-llvm-passes");
let run_typestate = !opt_present(match, "no-typestate");
let sysroot_opt = getopts::opt_maybe_str(match, "sysroot");
let target_opt = getopts::opt_maybe_str(match, "target");
let no_asm_comments = getopts::opt_present(match, "no-asm-comments");
Expand Down Expand Up @@ -407,7 +403,6 @@ fn build_session_options(match: getopts::match)
optimize: opt_level,
debuginfo: debuginfo,
verify: verify,
run_typestate: run_typestate,
save_temps: save_temps,
stats: stats,
time_passes: time_passes,
Expand Down Expand Up @@ -458,7 +453,7 @@ fn opts() -> [getopts::opt] {
optflag("c"), optopt("o"), optflag("g"), optflag("save-temps"),
optopt("sysroot"), optopt("target"), optflag("stats"),
optflag("time-passes"), optflag("time-llvm-passes"),
optflag("no-typestate"), optflag("noverify"),
optflag("noverify"),
optmulti("cfg"), optflag("test"),
optflag("lib"), optflag("static"), optflag("gc"),
optflag("stack-growth"), optflag("check-unsafe"),
Expand Down
1 change: 0 additions & 1 deletion src/comp/driver/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ type options =
optimize: uint,
debuginfo: bool,
verify: bool,
run_typestate: bool,
save_temps: bool,
stats: bool,
time_passes: bool,
Expand Down

0 comments on commit 99c421f

Please sign in to comment.