Skip to content

Commit 3b6d00d

Browse files
author
Lukas Markeffsky
committed
expand comment on Pointee projection candidate assembly
1 parent c387b89 commit 3b6d00d

File tree

1 file changed

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

1 file changed

+4
-2
lines changed

compiler/rustc_trait_selection/src/traits/project.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1916,8 +1916,10 @@ fn assemble_candidates_from_impls<'cx, 'tcx>(
19161916
// Integers and floats are always Sized, and so have unit type metadata.
19171917
| ty::Infer(ty::InferTy::IntVar(_) | ty::InferTy::FloatVar(..)) => true,
19181918

1919-
// type parameters, opaques, and unnormalized projections have pointer
1920-
// metadata if they're known (e.g. by the param_env) to be sized
1919+
// Type parameters, opaques, and unnormalized projections have unit
1920+
// metadata if they're known (e.g. by the param_env) to be sized.
1921+
// If they're not known to be sized, then we normalize from
1922+
// `Wrapper<Tail>::Metadata` to `Tail::Metadata` if able.
19211923
ty::Param(_) | ty::Alias(..)
19221924
if self_ty != tail || selcx.infcx.predicate_must_hold_modulo_regions(
19231925
&obligation.with(

0 commit comments

Comments
 (0)