about summary refs log tree commit diff
diff options
context:
space:
mode:
authorStefan Plantikow <stefan.plantikow@googlemail.com>2011-11-13 22:47:11 +0100
committerBrian Anderson <banderson@mozilla.com>2011-11-16 18:52:46 -0800
commit99c421f01d85f3acf1047ae5bf6afa6f0d1253b4 (patch)
tree6b65d8fd6f1a3baf191b7d450e7e8426f23b9ba2
parent02cebbb9f1d30fbad2b82ac1599c593b5af95019 (diff)
downloadrust-99c421f01d85f3acf1047ae5bf6afa6f0d1253b4.tar.gz
rust-99c421f01d85f3acf1047ae5bf6afa6f0d1253b4.zip
Removed --no-typestate flag from rutsc
Fixes issue #1139
-rw-r--r--Makefile.in3
-rw-r--r--man/rustc.14
-rw-r--r--src/comp/driver/rustc.rs11
-rw-r--r--src/comp/driver/session.rs1
4 files changed, 3 insertions, 16 deletions
diff --git a/Makefile.in b/Makefile.in
index 229daf85410..1612fba873a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -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
diff --git a/man/rustc.1 b/man/rustc.1
index 58109cd1e9e..36ddea96ef4 100644
--- a/man/rustc.1
+++ b/man/rustc.1
@@ -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
diff --git a/src/comp/driver/rustc.rs b/src/comp/driver/rustc.rs
index 2c287c15b4e..1937311a42a 100644
--- a/src/comp/driver/rustc.rs
+++ b/src/comp/driver/rustc.rs
@@ -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));
@@ -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)
@@ -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");
@@ -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,
@@ -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"),
diff --git a/src/comp/driver/session.rs b/src/comp/driver/session.rs
index 9793dae65d7..c5708551ad9 100644
--- a/src/comp/driver/session.rs
+++ b/src/comp/driver/session.rs
@@ -29,7 +29,6 @@ type options =
      optimize: uint,
      debuginfo: bool,
      verify: bool,
-     run_typestate: bool,
      save_temps: bool,
      stats: bool,
      time_passes: bool,