Remove warning about non-void expr stmts.

This commit is contained in:
Graydon Hoare 2010-11-22 18:03:14 -08:00
parent c20ea9e60a
commit f2a7e712d3

View File

@ -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));
}
}