about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/solve
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-07-28 08:53:12 +0000
committerbors <bors@rust-lang.org>2023-07-28 08:53:12 +0000
commitaafd75a9c510b0e91746b891eb4ebade43899af5 (patch)
tree5f81d2d5752ef12a0a7aab349380d83fa7e68755 /compiler/rustc_trait_selection/src/solve
parent37343f4a4d4ed7ad0891cb79e8eb25acf43fb821 (diff)
parentb0fa2201d3e2d4c206e633bf47f562c660aad8b5 (diff)
downloadrust-aafd75a9c510b0e91746b891eb4ebade43899af5.tar.gz
rust-aafd75a9c510b0e91746b891eb4ebade43899af5.zip
Auto merge of #114134 - fee1-dead-contrib:rm-constness-from-param-env, r=oli-obk
Remove `constness` from `ParamEnv`

This should be replaced by keyword generics/effects. cc #110395

r? `@oli-obk`
Diffstat (limited to 'compiler/rustc_trait_selection/src/solve')
-rw-r--r--compiler/rustc_trait_selection/src/solve/trait_goals.rs13
1 files changed, 5 insertions, 8 deletions
diff --git a/compiler/rustc_trait_selection/src/solve/trait_goals.rs b/compiler/rustc_trait_selection/src/solve/trait_goals.rs
index 24ea9b5ea12..40ce4a3b3e4 100644
--- a/compiler/rustc_trait_selection/src/solve/trait_goals.rs
+++ b/compiler/rustc_trait_selection/src/solve/trait_goals.rs
@@ -449,14 +449,11 @@ impl<'tcx> assembly::GoalKind<'tcx> for TraitPredicate<'tcx> {
             return Err(NoSolution);
         }
 
-        if !goal.param_env.is_const() {
-            // `Destruct` is automatically implemented for every type in
-            // non-const environments.
-            ecx.evaluate_added_goals_and_make_canonical_response(Certainty::Yes)
-        } else {
-            // FIXME(-Ztrait-solver=next): Implement this when we get const working in the new solver
-            Err(NoSolution)
-        }
+        // FIXME(-Ztrait-solver=next): Implement this when we get const working in the new solver
+
+        // `Destruct` is automatically implemented for every type in
+        // non-const environments.
+        ecx.evaluate_added_goals_and_make_canonical_response(Certainty::Yes)
     }
 
     fn consider_builtin_transmute_candidate(