@@ -44,17 +44,17 @@ impl CollectedBound {
4444struct CollectedSizednessBounds {
4545 // Collected `Sized` bounds
4646 sized : CollectedBound ,
47- // Collected `MetaSized ` bounds
48- meta_sized : CollectedBound ,
47+ // Collected `SizeOfVal ` bounds
48+ size_of_val : CollectedBound ,
4949 // Collected `PointeeSized` bounds
5050 pointee_sized : CollectedBound ,
5151}
5252
5353impl CollectedSizednessBounds {
5454 /// Returns `true` if any of `Trait`, `?Trait` or `!Trait` were encountered for `Sized`,
55- /// `MetaSized ` or `PointeeSized`.
55+ /// `SizeOfVal ` or `PointeeSized`.
5656 fn any ( & self ) -> bool {
57- self . sized . any ( ) || self . meta_sized . any ( ) || self . pointee_sized . any ( )
57+ self . sized . any ( ) || self . size_of_val . any ( ) || self . pointee_sized . any ( )
5858 }
5959}
6060
@@ -127,13 +127,13 @@ fn collect_sizedness_bounds<'tcx>(
127127 let sized_did = tcx. require_lang_item ( hir:: LangItem :: Sized , span) ;
128128 let sized = collect_bounds ( hir_bounds, context, sized_did) ;
129129
130- let meta_sized_did = tcx. require_lang_item ( hir:: LangItem :: MetaSized , span) ;
131- let meta_sized = collect_bounds ( hir_bounds, context, meta_sized_did ) ;
130+ let size_of_val_did = tcx. require_lang_item ( hir:: LangItem :: SizeOfVal , span) ;
131+ let size_of_val = collect_bounds ( hir_bounds, context, size_of_val_did ) ;
132132
133133 let pointee_sized_did = tcx. require_lang_item ( hir:: LangItem :: PointeeSized , span) ;
134134 let pointee_sized = collect_bounds ( hir_bounds, context, pointee_sized_did) ;
135135
136- CollectedSizednessBounds { sized, meta_sized , pointee_sized }
136+ CollectedSizednessBounds { sized, size_of_val , pointee_sized }
137137}
138138
139139/// Add a trait bound for `did`.
@@ -155,9 +155,9 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
155155 ///
156156 /// - On parameters, opaque type and associated types, add default `Sized` bound if no explicit
157157 /// sizedness bounds are present.
158- /// - On traits and trait aliases, add default `MetaSized ` supertrait if no explicit sizedness
158+ /// - On traits and trait aliases, add default `SizeOfVal ` supertrait if no explicit sizedness
159159 /// bounds are present.
160- /// - On parameters, opaque type, associated types and trait aliases, add a `MetaSized ` bound if
160+ /// - On parameters, opaque type, associated types and trait aliases, add a `SizeOfVal ` bound if
161161 /// a `?Sized` bound is present.
162162 pub ( crate ) fn add_implicit_sizedness_bounds (
163163 & self ,
@@ -174,7 +174,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
174174 return ;
175175 }
176176
177- let meta_sized_did = tcx. require_lang_item ( hir:: LangItem :: MetaSized , span) ;
177+ let size_of_val_did = tcx. require_lang_item ( hir:: LangItem :: SizeOfVal , span) ;
178178 let pointee_sized_did = tcx. require_lang_item ( hir:: LangItem :: PointeeSized , span) ;
179179
180180 // If adding sizedness bounds to a trait, then there are some relevant early exits
@@ -210,18 +210,18 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
210210 let collected = collect_sizedness_bounds ( tcx, hir_bounds, context, span) ;
211211 if ( collected. sized . maybe || collected. sized . negative )
212212 && !collected. sized . positive
213- && !collected. meta_sized . any ( )
213+ && !collected. size_of_val . any ( )
214214 && !collected. pointee_sized . any ( )
215215 {
216- // `?Sized` is equivalent to `MetaSized ` (but only add the bound if there aren't any
216+ // `?Sized` is equivalent to `SizeOfVal ` (but only add the bound if there aren't any
217217 // other explicit ones) - this can happen for trait aliases as well as bounds.
218- add_trait_bound ( tcx, bounds, self_ty, meta_sized_did , span) ;
218+ add_trait_bound ( tcx, bounds, self_ty, size_of_val_did , span) ;
219219 } else if !collected. any ( ) {
220220 match context {
221221 ImpliedBoundsContext :: TraitDef ( ..) => {
222222 // If there are no explicit sizedness bounds on a trait then add a default
223- // `MetaSized ` supertrait.
224- add_trait_bound ( tcx, bounds, self_ty, meta_sized_did , span) ;
223+ // `SizeOfVal ` supertrait.
224+ add_trait_bound ( tcx, bounds, self_ty, size_of_val_did , span) ;
225225 }
226226 ImpliedBoundsContext :: TyParam ( ..)
227227 | ImpliedBoundsContext :: AssociatedTypeOrImplTrait => {
0 commit comments