about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2018-06-25 15:27:37 +0100
committervarkor <github@varkor.com>2018-06-25 15:27:37 +0100
commitc3d6ee9e7b652546b892bc2eac56896a8a39415a (patch)
treebc2ff66b33cf1a1684006223b78cd4b58fe3755b
parentee7e30f14aa8437294aca766440ef1897d1a5703 (diff)
downloadrust-c3d6ee9e7b652546b892bc2eac56896a8a39415a.tar.gz
rust-c3d6ee9e7b652546b892bc2eac56896a8a39415a.zip
Make find_breakable_scope non-mutable
-rw-r--r--src/librustc_mir/build/scope.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_mir/build/scope.rs b/src/librustc_mir/build/scope.rs
index ee0a087a1dd..b9d6486d917 100644
--- a/src/librustc_mir/build/scope.rs
+++ b/src/librustc_mir/build/scope.rs
@@ -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()