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 117d21d commit 2885c67Copy full SHA for 2885c67
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