]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/middle/cfg/construct.rs
rollup merge of #17355 : gamazeps/issue17210
[rust.git] / src / librustc / middle / cfg / construct.rs
index 05cc61a754749b1d4af538ca5b78fe73d11c0a7d..b268c2a7a518b7ae08f975a3542453c82c74f7c5 100644 (file)
@@ -421,7 +421,14 @@ fn expr(&mut self, expr: &ast::Expr, pred: CFGIndex) -> CFGIndex {
 
             ast::ExprIndex(ref l, ref r) |
             ast::ExprBinary(_, ref l, ref r) if self.is_method_call(expr) => {
-                self.call(expr, pred, &**l, Some(&**r).move_iter())
+                self.call(expr, pred, &**l, Some(&**r).into_iter())
+            }
+
+            ast::ExprSlice(ref base, ref start, ref end, _) => {
+                self.call(expr,
+                          pred,
+                          &**base,
+                          start.iter().chain(end.iter()).map(|x| &**x))
             }
 
             ast::ExprUnary(_, ref e) if self.is_method_call(expr) => {
@@ -461,7 +468,7 @@ fn expr(&mut self, expr: &ast::Expr, pred: CFGIndex) -> CFGIndex {
             ast::ExprParen(ref e) |
             ast::ExprField(ref e, _, _) |
             ast::ExprTupField(ref e, _, _) => {
-                self.straightline(expr, pred, Some(&**e).move_iter())
+                self.straightline(expr, pred, Some(&**e).into_iter())
             }
 
             ast::ExprInlineAsm(ref inline_asm) => {