Skip to content

Commit 1ec2211

Browse files
committed
Disable warnings for unused function arguments. Temporary hack.
1 parent b02f1f4 commit 1ec2211

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/comp/middle/tstate/pre_post_conditions.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,8 +736,13 @@ fn find_pre_post_fn(fcx: &fn_ctxt, f: &_fn) {
736736
use_var(fcx, tsconstr_to_node_id(fcx.enclosing.i_return));
737737
use_var(fcx, tsconstr_to_node_id(fcx.enclosing.i_diverge));
738738

739-
find_pre_post_block(fcx, f.body);
739+
for a:arg in f.decl.inputs {
740+
// FIXME: Hack to avoid warning spew
741+
// Just pretend all arguments are used
742+
use_var(fcx, a.id);
743+
}
740744

745+
find_pre_post_block(fcx, f.body);
741746

742747
// Treat the tail expression as a return statement
743748
alt f.body.node.expr {

0 commit comments

Comments
 (0)