Skip to content

Commit

Permalink
Auto merge of rust-lang#108689 - compiler-errors:normalization-error-…
Browse files Browse the repository at this point in the history
…smaller, r=lcnr

Remove `NormalizationError::ConstantKind`

No longer in use by `TryNormalizeAfterErasingRegionsFolder` (as of rust-lang#102355 / e8150fa it seems). It's making `LayoutError`, etc. kinda large -- that was noticed by `@zoxc.`
  • Loading branch information
bors committed Mar 4, 2023
2 parents 0fbfc3e + a43b554 commit 01b7a6a
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions compiler/rustc_middle/src/ty/normalize_erasing_regions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand All @@ -16,15 +15,13 @@ 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> {
pub fn get_type_for_failure(&self) -> String {
match self {
NormalizationError::Type(t) => format!("{}", t),
NormalizationError::Const(c) => format!("{}", c),
NormalizationError::ConstantKind(ck) => format!("{}", ck),
}
}
}
Expand Down

0 comments on commit 01b7a6a

Please sign in to comment.