From f2a7e712d363a4a6da912073e86ab5a877a78214 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Mon, 22 Nov 2010 18:03:14 -0800 Subject: [PATCH] Remove warning about non-void expr stmts. --- src/comp/middle/typeck.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/comp/middle/typeck.rs b/src/comp/middle/typeck.rs index 4bbf3cf495b..49bdf690963 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)); } }