Eliminate the --check-claims compiler flag
The option can only be toggled at runtime now.
This commit is contained in:
parent
1ba85932b1
commit
88447a47c0
3 changed files with 3 additions and 12 deletions
|
@ -157,8 +157,7 @@ options:
|
||||||
--time-passes time the individual phases of the compiler
|
--time-passes time the individual phases of the compiler
|
||||||
--time-llvm-passes time the individual phases of the LLVM backend
|
--time-llvm-passes time the individual phases of the LLVM backend
|
||||||
--sysroot <path> override the system root (default: rustc's directory)
|
--sysroot <path> override the system root (default: rustc's directory)
|
||||||
--no-typestate don't run the typestate pass (unsafe!)
|
--no-typestate don't run the typestate pass (unsafe!)\n\n");
|
||||||
--check-claims treat 'claim' and 'check' synonymously\n\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_os(str triple) -> session::os {
|
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 time_llvm_passes = opt_present(match, "time-llvm-passes");
|
||||||
auto run_typestate = !opt_present(match, "no-typestate");
|
auto run_typestate = !opt_present(match, "no-typestate");
|
||||||
auto sysroot_opt = getopts::opt_maybe_str(match, "sysroot");
|
auto sysroot_opt = getopts::opt_maybe_str(match, "sysroot");
|
||||||
auto check_claims = opt_present(match, "check-claims");
|
|
||||||
let uint opt_level =
|
let uint opt_level =
|
||||||
if (opt_present(match, "O")) {
|
if (opt_present(match, "O")) {
|
||||||
if (opt_present(match, "OptLevel")) {
|
if (opt_present(match, "OptLevel")) {
|
||||||
|
@ -263,7 +261,6 @@ fn build_session_options(str binary, getopts::match match, str binary_dir) ->
|
||||||
stats=stats,
|
stats=stats,
|
||||||
time_passes=time_passes,
|
time_passes=time_passes,
|
||||||
time_llvm_passes=time_llvm_passes,
|
time_llvm_passes=time_llvm_passes,
|
||||||
check_claims=check_claims,
|
|
||||||
output_type=output_type,
|
output_type=output_type,
|
||||||
library_search_paths=library_search_paths,
|
library_search_paths=library_search_paths,
|
||||||
sysroot=sysroot);
|
sysroot=sysroot);
|
||||||
|
@ -299,7 +296,7 @@ fn main(vec[str] args) {
|
||||||
optflag("c"), optopt("o"), optflag("g"), optflag("save-temps"),
|
optflag("c"), optopt("o"), optflag("g"), optflag("save-temps"),
|
||||||
optopt("sysroot"), optflag("stats"), optflag("time-passes"),
|
optopt("sysroot"), optflag("stats"), optflag("time-passes"),
|
||||||
optflag("time-llvm-passes"), optflag("no-typestate"),
|
optflag("time-llvm-passes"), optflag("no-typestate"),
|
||||||
optflag("check-claims"), optflag("noverify")];
|
optflag("noverify")];
|
||||||
auto binary = vec::shift[str](args);
|
auto binary = vec::shift[str](args);
|
||||||
auto binary_dir = fs::dirname(binary);
|
auto binary_dir = fs::dirname(binary);
|
||||||
auto match =
|
auto match =
|
||||||
|
|
|
@ -32,7 +32,6 @@ type options =
|
||||||
bool stats,
|
bool stats,
|
||||||
bool time_passes,
|
bool time_passes,
|
||||||
bool time_llvm_passes,
|
bool time_llvm_passes,
|
||||||
bool check_claims,
|
|
||||||
back::link::output_type output_type,
|
back::link::output_type output_type,
|
||||||
vec[str] library_search_paths,
|
vec[str] library_search_paths,
|
||||||
str sysroot);
|
str sysroot);
|
||||||
|
|
|
@ -873,12 +873,7 @@ fn parse_bottom_expr(&parser p) -> @ast::expr {
|
||||||
|
|
||||||
auto e = parse_expr(p);
|
auto e = parse_expr(p);
|
||||||
auto hi = e.span.hi;
|
auto hi = e.span.hi;
|
||||||
ex = if (p.get_session().get_opts().check_claims) {
|
ex = ast::expr_check(ast::unchecked, e);
|
||||||
ast::expr_check(ast::checked, e)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
ast::expr_check(ast::unchecked, e)
|
|
||||||
};
|
|
||||||
} else if (eat_word(p, "ret")) {
|
} else if (eat_word(p, "ret")) {
|
||||||
alt (p.peek()) {
|
alt (p.peek()) {
|
||||||
case (token::SEMI) { ex = ast::expr_ret(none); }
|
case (token::SEMI) { ex = ast::expr_ret(none); }
|
||||||
|
|
Loading…
Reference in a new issue