about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-03-04 09:03:23 +0000
committerbors <bors@rust-lang.org>2023-03-04 09:03:23 +0000
commit01b7a6a9eac151f82831c402f91894552f5ca36d (patch)
treebc6932d010d85b2107540cf4bc969338588f715c
parent0fbfc3e76916521b509b63286296dd0762170d34 (diff)
parenta43b554259c29912d7242be0a6704987c57a18ff (diff)
downloadrust-01b7a6a9eac151f82831c402f91894552f5ca36d.tar.gz
rust-01b7a6a9eac151f82831c402f91894552f5ca36d.zip
Auto merge of #108689 - compiler-errors:normalization-error-smaller, r=lcnr
Remove `NormalizationError::ConstantKind`

No longer in use by `TryNormalizeAfterErasingRegionsFolder` (as of #102355 / e8150fa60cc445de7a57db634deb0668880be593 it seems). It's making `LayoutError`, etc. kinda large -- that was noticed by `@zoxc.`
-rw-r--r--compiler/rustc_middle/src/ty/normalize_erasing_regions.rs3
1 files changed, 0 insertions, 3 deletions
diff --git a/compiler/rustc_middle/src/ty/normalize_erasing_regions.rs b/compiler/rustc_middle/src/ty/normalize_erasing_regions.rs
index 57c8f3075b0..578cd82aa4c 100644
--- a/compiler/rustc_middle/src/ty/normalize_erasing_regions.rs
+++ b/compiler/rustc_middle/src/ty/normalize_erasing_regions.rs
@@ -7,7 +7,6 @@
 //! `normalize_generic_arg_after_erasing_regions` query for each type
 //! or constant found within. (This underlying query is what is cached.)
 
-use crate::mir;
 use crate::traits::query::NoSolution;
 use crate::ty::fold::{FallibleTypeFolder, TypeFoldable, TypeFolder};
 use crate::ty::{self, EarlyBinder, SubstsRef, Ty, TyCtxt, TypeVisitableExt};
@@ -16,7 +15,6 @@ use crate::ty::{self, EarlyBinder, SubstsRef, Ty, TyCtxt, TypeVisitableExt};
 pub enum NormalizationError<'tcx> {
     Type(Ty<'tcx>),
     Const(ty::Const<'tcx>),
-    ConstantKind(mir::ConstantKind<'tcx>),
 }
 
 impl<'tcx> NormalizationError<'tcx> {
@@ -24,7 +22,6 @@ impl<'tcx> NormalizationError<'tcx> {
         match self {
             NormalizationError::Type(t) => format!("{}", t),
             NormalizationError::Const(c) => format!("{}", c),
-            NormalizationError::ConstantKind(ck) => format!("{}", ck),
         }
     }
 }