about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaria Sukhonina <dariasukhonina@gmail.com>2024-03-12 14:37:13 +0300
committerDaria Sukhonina <dariasukhonina@gmail.com>2024-03-12 14:37:22 +0300
commit5336a02d280c8d69e5bbcf2ec11887e4b2aa86e2 (patch)
tree752c39e3a4e3e5acd501547467e4ba9eea1a6520
parent5b7343b96681c93f6fe752b46d9427f9dee8f94b (diff)
downloadrust-5336a02d280c8d69e5bbcf2ec11887e4b2aa86e2.tar.gz
rust-5336a02d280c8d69e5bbcf2ec11887e4b2aa86e2.zip
Fix discriminant_kind copy paste from the pointee trait case
-rw-r--r--compiler/rustc_trait_selection/src/traits/project.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/project.rs b/compiler/rustc_trait_selection/src/traits/project.rs
index 68c03e3c73e..6756b5dec23 100644
--- a/compiler/rustc_trait_selection/src/traits/project.rs
+++ b/compiler/rustc_trait_selection/src/traits/project.rs
@@ -1061,8 +1061,9 @@ fn assemble_candidates_from_impls<'cx, 'tcx>(
                         // Integers and floats always have `u8` as their discriminant.
                         | ty::Infer(ty::InferTy::IntVar(_) | ty::InferTy::FloatVar(..)) => true,
 
-                         // type parameters, opaques, and unnormalized projections have pointer
-                        // metadata if they're known (e.g. by the param_env) to be sized
+                        // type parameters, opaques, and unnormalized projections don't have
+                        // a known discriminant and may need to be normalized further or rely
+                        // on param env for discriminant projections
                         ty::Param(_)
                         | ty::Alias(..)
                         | ty::Bound(..)