try to bless 32bit mir tests manually

This commit is contained in:
b-naber 2022-02-14 16:48:05 +01:00
parent fff06e5edc
commit db019f2160
6 changed files with 42 additions and 22 deletions

View file

@ -686,15 +686,15 @@ pub fn write_allocations<'tcx>(
struct CollectAllocIds(BTreeSet<AllocId>);
impl<'tcx> Visitor<'tcx> for CollectAllocIds {
fn visit_const(&mut self, c: &&'tcx ty::Const<'tcx>, _loc: Location) {
if let ty::ConstKind::Value(val) = c.val {
fn visit_const(&mut self, c: ty::Const<'tcx>, _loc: Location) {
if let ty::ConstKind::Value(val) = c.val() {
self.0.extend(alloc_ids_from_const(val));
}
}
fn visit_constant(&mut self, c: &Constant<'tcx>, loc: Location) {
match c.literal {
ConstantKind::Ty(c) => self.visit_const(&c, loc),
ConstantKind::Ty(c) => self.visit_const(c, loc),
ConstantKind::Val(val, _) => {
self.0.extend(alloc_ids_from_const(val));
}

View file

@ -717,11 +717,7 @@ impl<'tcx> fmt::Display for Pat<'tcx> {
Some(&adt_def.variants[variant_index])
}
_ => self.ty.ty_adt_def().and_then(|adt| {
if !adt.is_enum() {
Some(adt.non_enum_variant())
} else {
None
}
if !adt.is_enum() { Some(adt.non_enum_variant()) } else { None }
}),
};