Skip to content

Commit b93713f

Browse files
committed
manually inline and rm visit_abstract_const_expr
1 parent c5c6ef7 commit b93713f

File tree

1 file changed

+9
-16
lines changed
  • compiler/rustc_privacy/src

1 file changed

+9
-16
lines changed

compiler/rustc_privacy/src/lib.rs

+9-16
Original file line numberDiff line numberDiff line change
@@ -165,20 +165,6 @@ where
165165
}
166166
}
167167

168-
fn visit_abstract_const_expr(
169-
&mut self,
170-
tcx: TyCtxt<'tcx>,
171-
ct: AbstractConst<'tcx>,
172-
) -> ControlFlow<V::BreakTy> {
173-
walk_abstract_const(tcx, ct, |node| match node.root(tcx) {
174-
ACNode::Leaf(leaf) => self.visit_const(leaf),
175-
ACNode::Cast(_, _, ty) => self.visit_ty(ty),
176-
ACNode::Binop(..) | ACNode::UnaryOp(..) | ACNode::FunctionCall(_, _) => {
177-
ControlFlow::CONTINUE
178-
}
179-
})
180-
}
181-
182168
fn visit_predicates(
183169
&mut self,
184170
predicates: ty::GenericPredicates<'tcx>,
@@ -301,9 +287,16 @@ where
301287
self.visit_ty(c.ty())?;
302288
let tcx = self.def_id_visitor.tcx();
303289
if let Ok(Some(ct)) = AbstractConst::from_const(tcx, c) {
304-
self.visit_abstract_const_expr(tcx, ct)?;
290+
walk_abstract_const(tcx, ct, |node| match node.root(tcx) {
291+
ACNode::Leaf(leaf) => self.visit_const(leaf),
292+
ACNode::Cast(_, _, ty) => self.visit_ty(ty),
293+
ACNode::Binop(..) | ACNode::UnaryOp(..) | ACNode::FunctionCall(_, _) => {
294+
ControlFlow::CONTINUE
295+
}
296+
})
297+
} else {
298+
ControlFlow::CONTINUE
305299
}
306-
ControlFlow::CONTINUE
307300
}
308301
}
309302

0 commit comments

Comments
 (0)