diff options
| author | Michael Goulet <michael@errs.io> | 2025-06-26 20:15:22 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-26 20:15:22 -0400 |
| commit | d712024aeec93f199029d2d761260a15c25b0201 (patch) | |
| tree | 89ed4957d822d0cd87df3b97df05cdb822c9df1a /compiler/rustc_next_trait_solver/src | |
| parent | 58cda76585336dd7ea4748c3616f65e90b3a8116 (diff) | |
| parent | df426cf289cf7374d5b4439efb5cd4238d405710 (diff) | |
| download | rust-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_next_trait_solver/src')
| -rw-r--r-- | compiler/rustc_next_trait_solver/src/solve/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_next_trait_solver/src/solve/mod.rs b/compiler/rustc_next_trait_solver/src/solve/mod.rs index e4e0aba7b50..4f845ef9cd9 100644 --- a/compiler/rustc_next_trait_solver/src/solve/mod.rs +++ b/compiler/rustc_next_trait_solver/src/solve/mod.rs @@ -211,7 +211,7 @@ where ty::ConstKind::Bound(_, _) => panic!("escaping bound vars in {:?}", ct), ty::ConstKind::Value(cv) => cv.ty(), ty::ConstKind::Placeholder(placeholder) => { - self.cx().find_const_ty_from_env(goal.param_env, placeholder) + placeholder.find_const_ty_from_env(goal.param_env) } }; |
