X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_middle%2Fsrc%2Fmir%2Fpretty.rs;h=f2ad591071114bb043961e8c8679a4211447c2e2;hb=7be8693984d32d2f65ce9ded4f65b6b7340bddce;hp=8cc705384b03e7bb8bdabf0c826bc087cb0b7c9a;hpb=5a5c9282e04711df07beb883eb463a136f91fbf9;p=rust.git diff --git a/compiler/rustc_middle/src/mir/pretty.rs b/compiler/rustc_middle/src/mir/pretty.rs index 8cc705384b0..f2ad5910711 100644 --- a/compiler/rustc_middle/src/mir/pretty.rs +++ b/compiler/rustc_middle/src/mir/pretty.rs @@ -476,8 +476,8 @@ fn visit_const(&mut self, constant: &&'tcx ty::Const<'tcx>, _: Location) { ty::ConstKind::Unevaluated(uv) => format!( "Unevaluated({}, {:?}, {:?})", self.tcx.def_path_str(uv.def.did), - uv.substs(self.tcx), - uv.promoted + uv.substs, + uv.promoted, ), ty::ConstKind::Value(val) => format!("Value({:?})", val), ty::ConstKind::Error(_) => "Error".to_string(), @@ -683,12 +683,6 @@ fn alloc_ids_from_const(val: ConstValue<'_>) -> impl Iterator + } struct CollectAllocIds(BTreeSet); impl<'tcx> TypeVisitor<'tcx> for CollectAllocIds { - fn tcx_for_anon_const_substs(&self) -> Option> { - // `AllocId`s are only inside of `ConstKind::Value` which - // can't be part of the anon const default substs. - None - } - fn visit_const(&mut self, c: &'tcx ty::Const<'tcx>) -> ControlFlow { if let ty::ConstKind::Value(val) = c.val { self.0.extend(alloc_ids_from_const(val));