Remove visit_body from YieldFinder

This commit is contained in:
John Kåre Alsaker 2017-07-20 05:44:41 +02:00
parent 5da9a8aa19
commit 9a6a8668ae

View file

@ -1150,10 +1150,6 @@ impl<'tcx> Visitor<'tcx> for YieldFinder {
NestedVisitorMap::None
}
fn visit_body(&mut self, _body: &'tcx hir::Body) {
// Closures don't execute
}
fn visit_expr(&mut self, expr: &'tcx hir::Expr) {
if let hir::ExprYield(..) = expr.node {
if self.0.is_none() {