Skip to content

Commit 5336a02

Browse files
committed
Fix discriminant_kind copy paste from the pointee trait case
1 parent 5b7343b commit 5336a02

File tree

1 file changed

+3
-2
lines changed
  • compiler/rustc_trait_selection/src/traits

1 file changed

+3
-2
lines changed

compiler/rustc_trait_selection/src/traits/project.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1061,8 +1061,9 @@ fn assemble_candidates_from_impls<'cx, 'tcx>(
10611061
// Integers and floats always have `u8` as their discriminant.
10621062
| ty::Infer(ty::InferTy::IntVar(_) | ty::InferTy::FloatVar(..)) => true,
10631063

1064-
// type parameters, opaques, and unnormalized projections have pointer
1065-
// metadata if they're known (e.g. by the param_env) to be sized
1064+
// type parameters, opaques, and unnormalized projections don't have
1065+
// a known discriminant and may need to be normalized further or rely
1066+
// on param env for discriminant projections
10661067
ty::Param(_)
10671068
| ty::Alias(..)
10681069
| ty::Bound(..)

0 commit comments

Comments
 (0)