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:
parent
2f77212e0c
commit
2d3f122534
@ -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 }
|
||||
|
Loading…
x
Reference in New Issue
Block a user