diff options
| author | Graydon Hoare <[email protected]> | 2010-11-22 18:03:14 -0800 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-11-22 18:03:27 -0800 |
| commit | f2a7e712d363a4a6da912073e86ab5a877a78214 (patch) | |
| tree | e34b829250fc6502ec1780fe8dfda0d1685b107a | |
| parent | rustc: Un-XFAIL compile-fail/arg-type-mismatch.rs. (diff) | |
| download | rust-f2a7e712d363a4a6da912073e86ab5a877a78214.tar.xz rust-f2a7e712d363a4a6da912073e86ab5a877a78214.zip | |
Remove warning about non-void expr stmts.
| -rw-r--r-- | src/comp/middle/typeck.rs | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/comp/middle/typeck.rs b/src/comp/middle/typeck.rs index 4bbf3cf4..49bdf690 100644 --- a/src/comp/middle/typeck.rs +++ b/src/comp/middle/typeck.rs @@ -1236,12 +1236,6 @@ fn check_stmt(&fn_ctxt fcx, &@ast.stmt stmt) case (ast.stmt_expr(?expr)) { auto expr_t = check_expr(fcx, expr); - if (!are_compatible(fcx, expr_ty(expr_t), plain_ty(ty_nil))) { - // TODO: real warning function - log "warning: expression used as statement should have " + - "void type"; - } - ret @fold.respan[ast.stmt_](stmt.span, ast.stmt_expr(expr_t)); } } |