We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 251d523 commit b5b96f1Copy full SHA for b5b96f1
[refs]
@@ -1,2 +1,2 @@
1
---
2
-refs/heads/master: c20ea9e60af0d12ec72a503df65ba181ff8c121d
+refs/heads/master: f2a7e712d363a4a6da912073e86ab5a877a78214
trunk/src/comp/middle/typeck.rs
@@ -1236,12 +1236,6 @@ fn check_stmt(&fn_ctxt fcx, &@ast.stmt stmt)
1236
1237
case (ast.stmt_expr(?expr)) {
1238
auto expr_t = check_expr(fcx, expr);
1239
- if (!are_compatible(fcx, expr_ty(expr_t), plain_ty(ty_nil))) {
1240
- // TODO: real warning function
1241
- log "warning: expression used as statement should have " +
1242
- "void type";
1243
- }
1244
-
1245
ret @fold.respan[ast.stmt_](stmt.span, ast.stmt_expr(expr_t));
1246
}
1247
0 commit comments