Make expand_abstract_consts
infallible
This commit is contained in:
parent
4085e94ece
commit
2ac5d91d63
8 changed files with 52 additions and 105 deletions
|
@ -284,14 +284,8 @@ 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)
|
||||
{
|
||||
ct.super_visit_with(self)?;
|
||||
}
|
||||
ControlFlow::CONTINUE
|
||||
tcx.expand_abstract_consts(c).super_visit_with(self)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue