about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs
diff options
context:
space:
mode:
authorBoxy <supbscripter@gmail.com>2022-11-24 08:20:51 +0000
committerkadmin <julianknodt@gmail.com>2022-11-25 09:28:44 +0000
commit430f7d16e669d0dc21e7c7545c72720a4f0acfaf (patch)
tree6326c530a16a60233be558498698813ad1f35aaa /compiler/rustc_trait_selection/src/traits/const_evaluatable.rs
parent95e1a39c048b922754b3bc0fc5d305259a56289f (diff)
downloadrust-430f7d16e669d0dc21e7c7545c72720a4f0acfaf.tar.gz
rust-430f7d16e669d0dc21e7c7545c72720a4f0acfaf.zip
add FIXME's
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/const_evaluatable.rs')
-rw-r--r--compiler/rustc_trait_selection/src/traits/const_evaluatable.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs b/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs
index 42d50b68c6d..b72bc42fa65 100644
--- a/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs
+++ b/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs
@@ -149,6 +149,13 @@ fn satisfied_from_param_env<'tcx>(
             } else if let ty::ConstKind::Expr(e) = c.kind() {
                 e.visit_with(self)
             } else {
+                // FIXME(generic_const_exprs): This doesn't recurse into `<T as Trait<U>>::ASSOC`'s substs.
+                // This is currently unobservable as `<T as Trait<{ U + 1 }>>::ASSOC` creates an anon const
+                // with its own `ConstEvaluatable` bound in the param env which we will visit separately.
+                //
+                // If we start allowing directly writing `ConstKind::Expr` without an intermediate anon const
+                // this will be incorrect. It might be worth investigating making `predicates_of` elaborate
+                // all of the `ConstEvaluatable` bounds rather than having a visitor here.
                 ControlFlow::CONTINUE
             }
         }