From 88447a47c08a3903fc6dc46863724745a923597a Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Wed, 29 Jun 2011 11:26:47 -0700 Subject: [PATCH] Eliminate the --check-claims compiler flag The option can only be toggled at runtime now. --- src/comp/driver/rustc.rs | 7 ++----- src/comp/driver/session.rs | 1 - src/comp/front/parser.rs | 7 +------ 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/comp/driver/rustc.rs b/src/comp/driver/rustc.rs index d4bda29a9b9f..7c035f84ae88 100644 --- a/src/comp/driver/rustc.rs +++ b/src/comp/driver/rustc.rs @@ -157,8 +157,7 @@ options: --time-passes time the individual phases of the compiler --time-llvm-passes time the individual phases of the LLVM backend --sysroot override the system root (default: rustc's directory) - --no-typestate don't run the typestate pass (unsafe!) - --check-claims treat 'claim' and 'check' synonymously\n\n"); + --no-typestate don't run the typestate pass (unsafe!)\n\n"); } fn get_os(str triple) -> session::os { @@ -227,7 +226,6 @@ fn build_session_options(str binary, getopts::match match, str binary_dir) -> auto time_llvm_passes = opt_present(match, "time-llvm-passes"); auto run_typestate = !opt_present(match, "no-typestate"); auto sysroot_opt = getopts::opt_maybe_str(match, "sysroot"); - auto check_claims = opt_present(match, "check-claims"); let uint opt_level = if (opt_present(match, "O")) { if (opt_present(match, "OptLevel")) { @@ -263,7 +261,6 @@ fn build_session_options(str binary, getopts::match match, str binary_dir) -> stats=stats, time_passes=time_passes, time_llvm_passes=time_llvm_passes, - check_claims=check_claims, output_type=output_type, library_search_paths=library_search_paths, sysroot=sysroot); @@ -299,7 +296,7 @@ fn main(vec[str] args) { optflag("c"), optopt("o"), optflag("g"), optflag("save-temps"), optopt("sysroot"), optflag("stats"), optflag("time-passes"), optflag("time-llvm-passes"), optflag("no-typestate"), - optflag("check-claims"), optflag("noverify")]; + optflag("noverify")]; auto binary = vec::shift[str](args); auto binary_dir = fs::dirname(binary); auto match = diff --git a/src/comp/driver/session.rs b/src/comp/driver/session.rs index d416d9c57f4a..da710fd3389f 100644 --- a/src/comp/driver/session.rs +++ b/src/comp/driver/session.rs @@ -32,7 +32,6 @@ type options = bool stats, bool time_passes, bool time_llvm_passes, - bool check_claims, back::link::output_type output_type, vec[str] library_search_paths, str sysroot); diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs index 60c91d7932e2..5c50a55e8e37 100644 --- a/src/comp/front/parser.rs +++ b/src/comp/front/parser.rs @@ -873,12 +873,7 @@ fn parse_bottom_expr(&parser p) -> @ast::expr { auto e = parse_expr(p); auto hi = e.span.hi; - ex = if (p.get_session().get_opts().check_claims) { - ast::expr_check(ast::checked, e) - } - else { - ast::expr_check(ast::unchecked, e) - }; + ex = ast::expr_check(ast::unchecked, e); } else if (eat_word(p, "ret")) { alt (p.peek()) { case (token::SEMI) { ex = ast::expr_ret(none); }