diff options
| author | b-naber <bn263@gmx.de> | 2022-02-14 16:48:05 +0100 |
|---|---|---|
| committer | b-naber <bn263@gmx.de> | 2022-02-15 22:24:53 +0100 |
| commit | db019f2160495b27f4bb6856c91eb9aab67cb4da (patch) | |
| tree | de97e32ddfa1e8d73c9aa42992c077b0e7ef4f60 /compiler | |
| parent | fff06e5edcb3c296164149b358566e63ed90b9d4 (diff) | |
| download | rust-db019f2160495b27f4bb6856c91eb9aab67cb4da.tar.gz rust-db019f2160495b27f4bb6856c91eb9aab67cb4da.zip | |
try to bless 32bit mir tests manually
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_middle/src/mir/pretty.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/thir.rs | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/compiler/rustc_middle/src/mir/pretty.rs b/compiler/rustc_middle/src/mir/pretty.rs index c263eb6f321..784babffeff 100644 --- a/compiler/rustc_middle/src/mir/pretty.rs +++ b/compiler/rustc_middle/src/mir/pretty.rs @@ -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)); } diff --git a/compiler/rustc_middle/src/thir.rs b/compiler/rustc_middle/src/thir.rs index a4e2a7c3e91..04bc0c8b521 100644 --- a/compiler/rustc_middle/src/thir.rs +++ b/compiler/rustc_middle/src/thir.rs @@ -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 } }), }; |
