]> git.lizzy.rs Git - rust.git/commitdiff
Removed --no-typestate flag from rutsc
authorStefan Plantikow <stefan.plantikow@googlemail.com>
Sun, 13 Nov 2011 21:47:11 +0000 (22:47 +0100)
committerBrian Anderson <banderson@mozilla.com>
Thu, 17 Nov 2011 02:52:46 +0000 (18:52 -0800)
Fixes issue #1139

Makefile.in
man/rustc.1
src/comp/driver/rustc.rs
src/comp/driver/session.rs

index 229daf85410ef746f0772a5df4b30f4b5a3de992..1612fba873a7a4cf6915114c5f6ea8f01517170f 100644 (file)
@@ -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
index 58109cd1e9e5525ad8c78a1a8726d7043a32b897..36ddea96ef466e109534a55eac85cb243d8dec7f 100644 (file)
@@ -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
index 2c287c15b4e697e52f5cb9adfc6f77b89048012e..1937311a42a64b6d80a977922304da8944633d5d 100644 (file)
@@ -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 @@ fn usage(argv0: str) {
     --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"),
index 9793dae65d7776d56d341a2dcb811c7afab5a1d5..c5708551ad91da78005f37441576e129ae3cbba3 100644 (file)
@@ -29,7 +29,6 @@
      optimize: uint,
      debuginfo: bool,
      verify: bool,
-     run_typestate: bool,
      save_temps: bool,
      stats: bool,
      time_passes: bool,