From aa25f22f197682de3b18fc4c8ba068d1feda220f Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Mon, 2 May 2011 11:23:07 -0700 Subject: Use different syntax for checks that matter to typestate This giant commit changes the syntax of Rust to use "assert" for "check" expressions that didn't mean anything to the typestate system, and continue using "check" for checks that are used as part of typestate checking. Most of the changes are just replacing "check" with "assert" in test cases and rustc. --- src/comp/pretty/pprust.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/comp/pretty') diff --git a/src/comp/pretty/pprust.rs b/src/comp/pretty/pprust.rs index e49ed34e..7ef91ce8 100644 --- a/src/comp/pretty/pprust.rs +++ b/src/comp/pretty/pprust.rs @@ -661,12 +661,18 @@ fn print_expr(ps s, &@ast.expr expr) { } print_expr(s, expr); } - case (ast.expr_check_expr(?expr,_)) { + case (ast.expr_check(?expr,_)) { wrd1(s, "check"); popen_h(s); print_expr(s, expr); pclose(s); } + case (ast.expr_assert(?expr,_)) { + wrd1(s, "assert"); + popen_h(s); + print_expr(s, expr); + pclose(s); + } case (ast.expr_ext(?path, ?args, ?body, _, _)) { wrd(s.s, "#"); print_path(s, path); -- cgit v1.2.3