Skip to content

Commit c3d6ee9

Browse files
committed
Make find_breakable_scope non-mutable
1 parent ee7e30f commit c3d6ee9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustc_mir/build/scope.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -540,12 +540,12 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
540540
// ==============
541541
/// Finds the breakable scope for a given label. This is used for
542542
/// resolving `break` and `continue`.
543-
pub fn find_breakable_scope(&mut self,
543+
pub fn find_breakable_scope(&self,
544544
span: Span,
545545
label: region::Scope)
546-
-> &mut BreakableScope<'tcx> {
546+
-> &BreakableScope<'tcx> {
547547
// find the loop-scope with the correct id
548-
self.breakable_scopes.iter_mut()
548+
self.breakable_scopes.iter()
549549
.rev()
550550
.filter(|breakable_scope| breakable_scope.region_scope == label)
551551
.next()

0 commit comments

Comments
 (0)