Skip to content

Commit c6b1ba5

Browse files
committed
Fixed spurious cannot borrow immutable item error with a closure.
1 parent dedbb4e commit c6b1ba5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_mir/build/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
581581
}
582582

583583
self.local_decls.push(LocalDecl {
584-
mutability: Mutability::Not,
584+
mutability: Mutability::Mut,
585585
ty,
586586
source_info: SourceInfo {
587587
scope: ARGUMENT_VISIBILITY_SCOPE,

0 commit comments

Comments
 (0)