]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_middle/src/mir/pretty.rs
Rollup merge of #92918 - compiler-errors:gat-expr-lifetime-elision, r=jackh726
[rust.git] / compiler / rustc_middle / src / mir / pretty.rs
index 8cc705384b03e7bb8bdabf0c826bc087cb0b7c9a..f2ad591071114bb043961e8c8679a4211447c2e2 100644 (file)
@@ -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<Item = AllocId> +
     }
     struct CollectAllocIds(BTreeSet<AllocId>);
     impl<'tcx> TypeVisitor<'tcx> for CollectAllocIds {
-        fn tcx_for_anon_const_substs(&self) -> Option<TyCtxt<'tcx>> {
-            // `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<Self::BreakTy> {
             if let ty::ConstKind::Value(val) = c.val {
                 self.0.extend(alloc_ids_from_const(val));