about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty/context.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-06-26 20:15:22 -0400
committerGitHub <noreply@github.com>2025-06-26 20:15:22 -0400
commitd712024aeec93f199029d2d761260a15c25b0201 (patch)
tree89ed4957d822d0cd87df3b97df05cdb822c9df1a /compiler/rustc_middle/src/ty/context.rs
parent58cda76585336dd7ea4748c3616f65e90b3a8116 (diff)
parentdf426cf289cf7374d5b4439efb5cd4238d405710 (diff)
downloadrust-d712024aeec93f199029d2d761260a15c25b0201.tar.gz
rust-d712024aeec93f199029d2d761260a15c25b0201.zip
Rollup merge of #142927 - compiler-errors:note-find-const, r=BoxyUwU
Add note to `find_const_ty_from_env`

Add a note to `find_const_ty_from_env` to explain why it has an `unwrap` which "often" causes ICEs.

Also, uplift it into the new trait solver. This avoids needing to go through the interner to call this method which is otherwise an inherent method in the compiler. I can remove this part if desired.

r? `@boxyuwu`
Diffstat (limited to 'compiler/rustc_middle/src/ty/context.rs')
-rw-r--r--compiler/rustc_middle/src/ty/context.rs8
1 files changed, 0 insertions, 8 deletions
diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs
index aa5355551ce..00e404a7098 100644
--- a/compiler/rustc_middle/src/ty/context.rs
+++ b/compiler/rustc_middle/src/ty/context.rs
@@ -698,14 +698,6 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
         self.unsizing_params_for_adt(adt_def_id)
     }
 
-    fn find_const_ty_from_env(
-        self,
-        param_env: ty::ParamEnv<'tcx>,
-        placeholder: Self::PlaceholderConst,
-    ) -> Ty<'tcx> {
-        placeholder.find_const_ty_from_env(param_env)
-    }
-
     fn anonymize_bound_vars<T: TypeFoldable<TyCtxt<'tcx>>>(
         self,
         binder: ty::Binder<'tcx, T>,