1
Fork 0
This commit is contained in:
b-naber 2022-07-28 11:06:16 +02:00
parent db9a2d2fbe
commit 29c0364c37
22 changed files with 25 additions and 56 deletions

View file

@ -222,17 +222,6 @@ impl<'a, 'tcx> AbstractConstBuilder<'a, 'tcx> {
debug!("AbstractConstBuilder::build: body={:?}", &*self.body);
self.recurse_build(self.body_id)?;
for n in self.nodes.iter() {
if let Node::Leaf(ct) = n {
if let ty::ConstKind::Unevaluated(ct) = ct.kind() {
// `AbstractConst`s should not contain any promoteds as they require references which
// are not allowed.
assert_eq!(ct.promoted, None);
assert_eq!(ct, self.tcx.erase_regions(ct));
}
}
}
Ok(self.tcx.arena.alloc_from_iter(self.nodes.into_iter()))
}