Skip to content

Commit ea93682

Browse files
committed
---
yaml --- r: 4793 b: refs/heads/master c: 2885c67 h: refs/heads/master i: 4791: 860c51d v: v3
1 parent 819389f commit ea93682

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
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: 117d21d6c25813a8894bd18170bb75a61e927acc
2+
refs/heads/master: 2885c67d473b4522441f118149945b516d5ca658

trunk/src/comp/middle/tstate/ck.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ fn check_unused_vars(fcx: &fn_ctxt) {
5252
for c: norm_constraint in constraints(fcx) {
5353
alt c.c.node {
5454
ninit(id, v) {
55-
if !vec_contains(fcx.enclosing.used_vars, id) {
56-
fcx.ccx.tcx.sess.span_warn(c.c.span, "Unused variable " + v);
55+
if !vec_contains(fcx.enclosing.used_vars, id) &&
56+
v.(0) != ('_' as u8) {
57+
fcx.ccx.tcx.sess.span_warn(c.c.span, "unused variable " + v);
5758
}
5859
}
5960
_ {/* ignore pred constraints */ }

0 commit comments

Comments
 (0)