]> 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 f1c288ae7a9aab382d6b825de77f2f1743779ce6..b268c2a7a518b7ae08f975a3542453c82c74f7c5 100644 (file)
@@ -424,6 +424,13 @@ fn expr(&mut self, expr: &ast::Expr, pred: CFGIndex) -> CFGIndex {
                 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) => {
                 self.call(expr, pred, &**e, None::<ast::Expr>.iter())
             }