12
12
fundamental,
13
13
marker_trait_attr,
14
14
const_trait_impl,
15
- const_destruct
15
+ const_destruct,
16
16
) ]
17
17
#![ allow( internal_features, incomplete_features) ]
18
18
#![ no_std]
@@ -32,7 +32,7 @@ pub trait Copy {}
32
32
33
33
impl Copy for bool { }
34
34
impl Copy for u8 { }
35
- impl < T : ? Sized > Copy for & T { }
35
+ impl < T : PointeeSized > Copy for & T { }
36
36
37
37
#[ lang = "add" ]
38
38
#[ const_trait]
@@ -113,17 +113,17 @@ pub trait Tuple {}
113
113
#[ lang = "legacy_receiver" ]
114
114
pub trait LegacyReceiver { }
115
115
116
- impl < T : ? Sized > LegacyReceiver for & T { }
116
+ impl < T : PointeeSized > LegacyReceiver for & T { }
117
117
118
- impl < T : ? Sized > LegacyReceiver for & mut T { }
118
+ impl < T : PointeeSized > LegacyReceiver for & mut T { }
119
119
120
120
#[ lang = "receiver" ]
121
121
pub trait Receiver {
122
122
#[ lang = "receiver_target" ]
123
- type Target : ? Sized ;
123
+ type Target : MetaSized ;
124
124
}
125
125
126
- impl < T : Deref + ? Sized > Receiver for T {
126
+ impl < T : Deref + MetaSized > Receiver for T {
127
127
type Target = <T as Deref >:: Target ;
128
128
}
129
129
@@ -169,15 +169,15 @@ fn panic_fmt() {}
169
169
170
170
#[ lang = "index" ]
171
171
#[ const_trait]
172
- pub trait Index < Idx : ? Sized > {
173
- type Output : ? Sized ;
172
+ pub trait Index < Idx : PointeeSized > {
173
+ type Output : MetaSized ;
174
174
175
175
fn index ( & self , index : Idx ) -> & Self :: Output ;
176
176
}
177
177
178
178
#[ const_trait]
179
- pub unsafe trait SliceIndex < T : ? Sized > {
180
- type Output : ? Sized ;
179
+ pub unsafe trait SliceIndex < T : PointeeSized > {
180
+ type Output : MetaSized ;
181
181
fn index ( self , slice : & T ) -> & Self :: Output ;
182
182
}
183
183
@@ -206,31 +206,31 @@ where
206
206
}
207
207
208
208
#[ lang = "unsize" ]
209
- pub trait Unsize < T : ? Sized > { }
209
+ pub trait Unsize < T : PointeeSized > : PointeeSized { }
210
210
211
211
#[ lang = "coerce_unsized" ]
212
- pub trait CoerceUnsized < T : ? Sized > { }
212
+ pub trait CoerceUnsized < T : PointeeSized > { }
213
213
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 { }
215
215
216
216
#[ lang = "deref" ]
217
217
#[ const_trait]
218
218
pub trait Deref {
219
219
#[ lang = "deref_target" ]
220
- type Target : ? Sized ;
220
+ type Target : MetaSized ;
221
221
222
222
fn deref ( & self ) -> & Self :: Target ;
223
223
}
224
224
225
- impl < T : ? Sized > const Deref for & T {
225
+ impl < T : MetaSized > const Deref for & T {
226
226
type Target = T ;
227
227
228
228
fn deref ( & self ) -> & T {
229
229
* self
230
230
}
231
231
}
232
232
233
- impl < T : ? Sized > const Deref for & mut T {
233
+ impl < T : MetaSized > const Deref for & mut T {
234
234
type Target = T ;
235
235
236
236
fn deref ( & self ) -> & T {
@@ -314,14 +314,14 @@ fn from_str(s: &str) -> Result<bool, ()> {
314
314
315
315
#[ lang = "eq" ]
316
316
#[ const_trait]
317
- pub trait PartialEq < Rhs : ? Sized = Self > {
317
+ pub trait PartialEq < Rhs : PointeeSized = Self > : PointeeSized {
318
318
fn eq ( & self , other : & Rhs ) -> bool ;
319
319
fn ne ( & self , other : & Rhs ) -> bool {
320
320
!self . eq ( other)
321
321
}
322
322
}
323
323
324
- impl < A : ? Sized , B : ? Sized > const PartialEq < & B > for & A
324
+ impl < A : PointeeSized , B : PointeeSized > const PartialEq < & B > for & A
325
325
where
326
326
A : ~const PartialEq < B > ,
327
327
{
@@ -364,7 +364,7 @@ impl<P> Pin<P> {
364
364
}
365
365
}
366
366
367
- impl < ' a , T : ? Sized > Pin < & ' a T > {
367
+ impl < ' a , T : PointeeSized > Pin < & ' a T > {
368
368
const fn get_ref ( self ) -> & ' a T {
369
369
self . pointer
370
370
}
@@ -379,7 +379,7 @@ impl<P: Deref> Pin<P> {
379
379
}
380
380
}
381
381
382
- impl < ' a , T : ? Sized > Pin < & ' a mut T > {
382
+ impl < ' a , T : PointeeSized > Pin < & ' a mut T > {
383
383
const unsafe fn get_unchecked_mut ( self ) -> & ' a mut T {
384
384
self . pointer
385
385
}
@@ -425,7 +425,7 @@ impl<T: Clone> Clone for RefCell<T> {
425
425
}
426
426
}
427
427
428
- struct RefCell < T : ? Sized > {
428
+ struct RefCell < T : PointeeSized > {
429
429
borrow : UnsafeCell < ( ) > ,
430
430
value : UnsafeCell < T > ,
431
431
}
@@ -434,24 +434,24 @@ impl<T> RefCell<T> {
434
434
loop { }
435
435
}
436
436
}
437
- impl < T : ? Sized > RefCell < T > {
437
+ impl < T : PointeeSized > RefCell < T > {
438
438
fn borrow ( & self ) -> Ref < ' _ , T > {
439
439
loop { }
440
440
}
441
441
}
442
442
443
443
#[ lang = "unsafe_cell" ]
444
444
#[ repr( transparent) ]
445
- struct UnsafeCell < T : ? Sized > {
445
+ struct UnsafeCell < T : PointeeSized > {
446
446
value : T ,
447
447
}
448
448
449
- struct Ref < ' b , T : ? Sized + ' b > {
449
+ struct Ref < ' b , T : PointeeSized + ' b > {
450
450
value : * const T ,
451
451
borrow : & ' b UnsafeCell < ( ) > ,
452
452
}
453
453
454
- impl < T : ? Sized > Deref for Ref < ' _ , T > {
454
+ impl < T : MetaSized > Deref for Ref < ' _ , T > {
455
455
type Target = T ;
456
456
457
457
#[ inline]
0 commit comments