@@ -115,9 +115,9 @@ where
115115    I :  Interner , 
116116{ 
117117    match  ty. kind ( )  { 
118-         // impl {Meta,}Sized for u*, i*, bool, f*, FnDef, FnPtr, *(const/mut) T, char 
119-         // impl {Meta,}Sized for &mut? T, [T; N], dyn* Trait, !, Coroutine, CoroutineWitness 
120-         // impl {Meta,}Sized for Closure, CoroutineClosure 
118+         // impl {Meta,Pointee, }Sized for u*, i*, bool, f*, FnDef, FnPtr, *(const/mut) T, char 
119+         // impl {Meta,Pointee, }Sized for &mut? T, [T; N], dyn* Trait, !, Coroutine, CoroutineWitness 
120+         // impl {Meta,Pointee, }Sized for Closure, CoroutineClosure 
121121        ty:: Infer ( ty:: IntVar ( _)  | ty:: FloatVar ( _) ) 
122122        | ty:: Uint ( _) 
123123        | ty:: Int ( _) 
@@ -138,14 +138,19 @@ where
138138        | ty:: Dynamic ( _,  _,  ty:: DynStar ) 
139139        | ty:: Error ( _)  => Ok ( ty:: Binder :: dummy ( vec ! [ ] ) ) , 
140140
141-         // impl {Meta,}Sized for str, [T], dyn Trait 
141+         // impl {Meta,Pointee, }Sized for str, [T], dyn Trait 
142142        ty:: Str  | ty:: Slice ( _)  | ty:: Dynamic ( ..)  => match  sizedness { 
143143            SizedTraitKind :: Sized  => Err ( NoSolution ) , 
144-             SizedTraitKind :: MetaSized  => Ok ( ty:: Binder :: dummy ( vec ! [ ] ) ) , 
144+             SizedTraitKind :: MetaSized  | SizedTraitKind :: PointeeSized  => { 
145+                 Ok ( ty:: Binder :: dummy ( vec ! [ ] ) ) 
146+             } 
145147        } , 
146148
147-         // impl {} for extern type 
148-         ty:: Foreign ( ..)  => Err ( NoSolution ) , 
149+         // impl PointeeSized for extern type 
150+         ty:: Foreign ( ..)  => match  sizedness { 
151+             SizedTraitKind :: Sized  | SizedTraitKind :: MetaSized  => Err ( NoSolution ) , 
152+             SizedTraitKind :: PointeeSized  => Ok ( ty:: Binder :: dummy ( vec ! [ ] ) ) , 
153+         } , 
149154
150155        ty:: Alias ( ..)  | ty:: Param ( _)  | ty:: Placeholder ( ..)  => Err ( NoSolution ) , 
151156
@@ -156,17 +161,17 @@ where
156161
157162        ty:: UnsafeBinder ( bound_ty)  => Ok ( bound_ty. map_bound ( |ty| vec ! [ ty] ) ) , 
158163
159-         // impl {Meta,}Sized for () 
160-         // impl {Meta,}Sized for (T1, T2, .., Tn) where Tn: {Meta,}Sized if n >= 1 
164+         // impl {Meta,Pointee, }Sized for () 
165+         // impl {Meta,Pointee, }Sized for (T1, T2, .., Tn) where Tn: {Meta,}Sized if n >= 1 
161166        ty:: Tuple ( tys)  => Ok ( ty:: Binder :: dummy ( tys. last ( ) . map_or_else ( Vec :: new,  |ty| vec ! [ ty] ) ) ) , 
162167
163-         // impl {Meta,}Sized for Adt<Args...> 
168+         // impl {Meta,Pointee, }Sized for Adt<Args...> 
164169        //   where {meta,pointee,}sized_constraint(Adt)<Args...>: {Meta,}Sized 
165170        // 
166171        //   `{meta,pointee,}sized_constraint(Adt)` is the deepest struct trail that can be 
167172        //   determined by the definition of `Adt`, independent of the generic args. 
168173        // 
169-         // impl {Meta,}Sized for Adt<Args...> 
174+         // impl {Meta,Pointee, }Sized for Adt<Args...> 
170175        //   if {meta,pointee,}sized_constraint(Adt) == None 
171176        // 
172177        //   As a performance optimization, `{meta,pointee,}sized_constraint(Adt)` can return `None` 
0 commit comments