Skip to content

Commit b5b96f1

Browse files
committed
---
yaml --- r: 943 b: refs/heads/master c: f2a7e71 h: refs/heads/master i: 941: 8e6fcad 939: 59b8c0d 935: 05e320d 927: 30367b5 v: v3
1 parent 251d523 commit b5b96f1

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: c20ea9e60af0d12ec72a503df65ba181ff8c121d
2+
refs/heads/master: f2a7e712d363a4a6da912073e86ab5a877a78214

trunk/src/comp/middle/typeck.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,12 +1236,6 @@ fn check_stmt(&fn_ctxt fcx, &@ast.stmt stmt)
12361236

12371237
case (ast.stmt_expr(?expr)) {
12381238
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-
12451239
ret @fold.respan[ast.stmt_](stmt.span, ast.stmt_expr(expr_t));
12461240
}
12471241
}

0 commit comments

Comments
 (0)