This commit is contained in:
Boxy
2022-11-21 04:32:07 +00:00
committed by kadmin
parent f59b91e8a0
commit 4833ce8673
5 changed files with 8 additions and 7 deletions

View File

@@ -286,8 +286,9 @@ where
fn visit_const(&mut self, c: Const<'tcx>) -> ControlFlow<Self::BreakTy> {
self.visit_ty(c.ty())?;
let tcx = self.def_id_visitor.tcx();
if let ty::ConstKind::Unevaluated(uv) = c.kind() &&
let Ok(Some(ct)) = tcx.expand_unevaluated_abstract_const(uv.def, uv.substs) {
if let ty::ConstKind::Unevaluated(uv) = c.kind()
&& let Ok(Some(ct)) = tcx.expand_unevaluated_abstract_const(uv.def, uv.substs)
{
ct.super_visit_with(self)?;
}
ControlFlow::CONTINUE