Skip to content

Commit 855e0a4

Browse files
committed
Fix bug in mutable-local-marking
Locals passed by mutable alias weren't being marked as mutated
1 parent 9db4d9c commit 855e0a4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/comp/middle/alias.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ fn check_call(cx: &ctx, f: &@ast::expr, args: &[@ast::expr], sc: &scope) ->
210210
~"passing an immutable object \
211211
field by mutable alias");
212212
}
213+
cx.mut_map.insert(dnum, ());
213214
} else {
214215
cx.tcx.sess.span_err(
215216
arg.span,

0 commit comments

Comments
 (0)