1212 fundamental,
1313 marker_trait_attr,
1414 const_trait_impl,
15- const_destruct
15+ const_destruct,
1616) ]
1717#![ allow( internal_features, incomplete_features) ]
1818#![ no_std]
@@ -32,7 +32,7 @@ pub trait Copy {}
3232
3333impl Copy for bool { }
3434impl Copy for u8 { }
35- impl < T : ? Sized > Copy for & T { }
35+ impl < T : PointeeSized > Copy for & T { }
3636
3737#[ lang = "add" ]
3838#[ const_trait]
@@ -113,17 +113,17 @@ pub trait Tuple {}
113113#[ lang = "legacy_receiver" ]
114114pub trait LegacyReceiver { }
115115
116- impl < T : ? Sized > LegacyReceiver for & T { }
116+ impl < T : PointeeSized > LegacyReceiver for & T { }
117117
118- impl < T : ? Sized > LegacyReceiver for & mut T { }
118+ impl < T : PointeeSized > LegacyReceiver for & mut T { }
119119
120120#[ lang = "receiver" ]
121121pub trait Receiver {
122122 #[ lang = "receiver_target" ]
123- type Target : ? Sized ;
123+ type Target : MetaSized ;
124124}
125125
126- impl < T : Deref + ? Sized > Receiver for T {
126+ impl < T : Deref + MetaSized > Receiver for T {
127127 type Target = <T as Deref >:: Target ;
128128}
129129
@@ -169,15 +169,15 @@ fn panic_fmt() {}
169169
170170#[ lang = "index" ]
171171#[ const_trait]
172- pub trait Index < Idx : ? Sized > {
173- type Output : ? Sized ;
172+ pub trait Index < Idx : PointeeSized > {
173+ type Output : MetaSized ;
174174
175175 fn index ( & self , index : Idx ) -> & Self :: Output ;
176176}
177177
178178#[ const_trait]
179- pub unsafe trait SliceIndex < T : ? Sized > {
180- type Output : ? Sized ;
179+ pub unsafe trait SliceIndex < T : PointeeSized > {
180+ type Output : MetaSized ;
181181 fn index ( self , slice : & T ) -> & Self :: Output ;
182182}
183183
@@ -206,31 +206,31 @@ where
206206}
207207
208208#[ lang = "unsize" ]
209- pub trait Unsize < T : ? Sized > { }
209+ pub trait Unsize < T : PointeeSized > : PointeeSized { }
210210
211211#[ lang = "coerce_unsized" ]
212- pub trait CoerceUnsized < T : ? Sized > { }
212+ pub trait CoerceUnsized < T : PointeeSized > { }
213213
214- impl < ' a , ' b : ' a , T : ? Sized + Unsize < U > , U : ? Sized > CoerceUnsized < & ' a U > for & ' b T { }
214+ impl < ' a , ' b : ' a , T : PointeeSized + Unsize < U > , U : PointeeSized > CoerceUnsized < & ' a U > for & ' b T { }
215215
216216#[ lang = "deref" ]
217217#[ const_trait]
218218pub trait Deref {
219219 #[ lang = "deref_target" ]
220- type Target : ? Sized ;
220+ type Target : MetaSized ;
221221
222222 fn deref ( & self ) -> & Self :: Target ;
223223}
224224
225- impl < T : ? Sized > const Deref for & T {
225+ impl < T : MetaSized > const Deref for & T {
226226 type Target = T ;
227227
228228 fn deref ( & self ) -> & T {
229229 * self
230230 }
231231}
232232
233- impl < T : ? Sized > const Deref for & mut T {
233+ impl < T : MetaSized > const Deref for & mut T {
234234 type Target = T ;
235235
236236 fn deref ( & self ) -> & T {
@@ -314,14 +314,14 @@ fn from_str(s: &str) -> Result<bool, ()> {
314314
315315#[ lang = "eq" ]
316316#[ const_trait]
317- pub trait PartialEq < Rhs : ? Sized = Self > {
317+ pub trait PartialEq < Rhs : PointeeSized = Self > : PointeeSized {
318318 fn eq ( & self , other : & Rhs ) -> bool ;
319319 fn ne ( & self , other : & Rhs ) -> bool {
320320 !self . eq ( other)
321321 }
322322}
323323
324- impl < A : ? Sized , B : ? Sized > const PartialEq < & B > for & A
324+ impl < A : PointeeSized , B : PointeeSized > const PartialEq < & B > for & A
325325where
326326 A : ~const PartialEq < B > ,
327327{
@@ -364,7 +364,7 @@ impl<P> Pin<P> {
364364 }
365365}
366366
367- impl < ' a , T : ? Sized > Pin < & ' a T > {
367+ impl < ' a , T : PointeeSized > Pin < & ' a T > {
368368 const fn get_ref ( self ) -> & ' a T {
369369 self . pointer
370370 }
@@ -379,7 +379,7 @@ impl<P: Deref> Pin<P> {
379379 }
380380}
381381
382- impl < ' a , T : ? Sized > Pin < & ' a mut T > {
382+ impl < ' a , T : PointeeSized > Pin < & ' a mut T > {
383383 const unsafe fn get_unchecked_mut ( self ) -> & ' a mut T {
384384 self . pointer
385385 }
@@ -425,7 +425,7 @@ impl<T: Clone> Clone for RefCell<T> {
425425 }
426426}
427427
428- struct RefCell < T : ? Sized > {
428+ struct RefCell < T : PointeeSized > {
429429 borrow : UnsafeCell < ( ) > ,
430430 value : UnsafeCell < T > ,
431431}
@@ -434,24 +434,24 @@ impl<T> RefCell<T> {
434434 loop { }
435435 }
436436}
437- impl < T : ? Sized > RefCell < T > {
437+ impl < T : PointeeSized > RefCell < T > {
438438 fn borrow ( & self ) -> Ref < ' _ , T > {
439439 loop { }
440440 }
441441}
442442
443443#[ lang = "unsafe_cell" ]
444444#[ repr( transparent) ]
445- struct UnsafeCell < T : ? Sized > {
445+ struct UnsafeCell < T : PointeeSized > {
446446 value : T ,
447447}
448448
449- struct Ref < ' b , T : ? Sized + ' b > {
449+ struct Ref < ' b , T : PointeeSized + ' b > {
450450 value : * const T ,
451451 borrow : & ' b UnsafeCell < ( ) > ,
452452}
453453
454- impl < T : ? Sized > Deref for Ref < ' _ , T > {
454+ impl < T : MetaSized > Deref for Ref < ' _ , T > {
455455 type Target = T ;
456456
457457 #[ inline]
0 commit comments