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
1 changed files with 3 additions and 7 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue