Remove a pointless check for intersection with RESTR_MUTATE

Now that all loans restrict mutation, there's no point in checking for
intersection with RESTR_MUTATE.
This commit is contained in:
Cameron Zwarich 2014-06-16 15:40:20 -07:00
parent 2f77212e0c
commit 2d3f122534

View File

@ -833,13 +833,9 @@ impl<'a> CheckLoanCtxt<'a> {
let cont = this.each_in_scope_restriction(assignment_id,
&*loan_path,
|loan, restr| {
if restr.set.intersects(RESTR_MUTATE) {
this.report_illegal_mutation(assignment_span, &*loan_path, loan);
false
} else {
true
}
|loan, _restr| {
this.report_illegal_mutation(assignment_span, &*loan_path, loan);
false
});
if !cont { return false }