about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/solve/normalize.rs
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2024-02-05 13:40:32 +0100
committerlcnr <rust@lcnr.de>2024-02-19 09:17:00 +0100
commit9771fb08b62d966a705a827e1177fa1b2308577c (patch)
tree8680bf184e278f16d2a531228b10678cf5f459d0 /compiler/rustc_trait_selection/src/solve/normalize.rs
parentdf55f56283d3e92a2fb1710b12cd891ca6a4e863 (diff)
downloadrust-9771fb08b62d966a705a827e1177fa1b2308577c.tar.gz
rust-9771fb08b62d966a705a827e1177fa1b2308577c.zip
split `project` into multiple files
Diffstat (limited to 'compiler/rustc_trait_selection/src/solve/normalize.rs')
-rw-r--r--compiler/rustc_trait_selection/src/solve/normalize.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_trait_selection/src/solve/normalize.rs b/compiler/rustc_trait_selection/src/solve/normalize.rs
index d87cc89954a..b07702e8421 100644
--- a/compiler/rustc_trait_selection/src/solve/normalize.rs
+++ b/compiler/rustc_trait_selection/src/solve/normalize.rs
@@ -1,6 +1,6 @@
 use crate::traits::error_reporting::TypeErrCtxtExt;
 use crate::traits::query::evaluate_obligation::InferCtxtExt;
-use crate::traits::{needs_normalization, BoundVarReplacer, PlaceholderReplacer};
+use crate::traits::{BoundVarReplacer, PlaceholderReplacer};
 use rustc_data_structures::stack::ensure_sufficient_stack;
 use rustc_infer::infer::at::At;
 use rustc_infer::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKind};
@@ -205,10 +205,9 @@ impl<'tcx> FallibleTypeFolder<TyCtxt<'tcx>> for NormalizationFolder<'_, 'tcx> {
     }
 
     fn try_fold_const(&mut self, ct: ty::Const<'tcx>) -> Result<ty::Const<'tcx>, Self::Error> {
-        let reveal = self.at.param_env.reveal();
         let infcx = self.at.infcx;
         debug_assert_eq!(ct, infcx.shallow_resolve(ct));
-        if !needs_normalization(&ct, reveal) {
+        if !ct.has_projections() {
             return Ok(ct);
         }