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 819389f commit ea93682Copy full SHA for ea93682
[refs]
@@ -1,2 +1,2 @@
1
---
2
-refs/heads/master: 117d21d6c25813a8894bd18170bb75a61e927acc
+refs/heads/master: 2885c67d473b4522441f118149945b516d5ca658
trunk/src/comp/middle/tstate/ck.rs
@@ -52,8 +52,9 @@ fn check_unused_vars(fcx: &fn_ctxt) {
52
for c: norm_constraint in constraints(fcx) {
53
alt c.c.node {
54
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);
+ if !vec_contains(fcx.enclosing.used_vars, id) &&
+ v.(0) != ('_' as u8) {
57
+ fcx.ccx.tcx.sess.span_warn(c.c.span, "unused variable " + v);
58
}
59
60
_ {/* ignore pred constraints */ }
0 commit comments