Skip to content

Commit

Permalink
Make find_breakable_scope non-mutable
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed Jun 25, 2018
1 parent ee7e30f commit c3d6ee9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/librustc_mir/build/scope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -540,12 +540,12 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
// ==============
/// Finds the breakable scope for a given label. This is used for
/// resolving `break` and `continue`.
pub fn find_breakable_scope(&mut self,
pub fn find_breakable_scope(&self,
span: Span,
label: region::Scope)
-> &mut BreakableScope<'tcx> {
-> &BreakableScope<'tcx> {
// find the loop-scope with the correct id
self.breakable_scopes.iter_mut()
self.breakable_scopes.iter()
.rev()
.filter(|breakable_scope| breakable_scope.region_scope == label)
.next()
Expand Down

0 comments on commit c3d6ee9

Please sign in to comment.