26
26
//! deref: sized
27
27
//! derive:
28
28
//! discriminant:
29
- //! drop:
29
+ //! drop: sized
30
30
//! env: option
31
31
//! eq: sized
32
32
//! error: fmt
37
37
//! future: pin
38
38
//! coroutine: pin
39
39
//! dispatch_from_dyn: unsize, pin
40
- //! hash:
40
+ //! hash: sized
41
41
//! include:
42
42
//! index: sized
43
43
//! infallible:
@@ -80,24 +80,18 @@ pub mod marker {
80
80
#[ lang = "pointee_sized" ]
81
81
#[ fundamental]
82
82
#[ rustc_specialization_trait]
83
- #[ rustc_deny_explicit_impl]
84
- #[ rustc_do_not_implement_via_object]
85
83
#[ rustc_coinductive]
86
84
pub trait PointeeSized { }
87
85
88
86
#[ lang = "meta_sized" ]
89
87
#[ fundamental]
90
88
#[ rustc_specialization_trait]
91
- #[ rustc_deny_explicit_impl]
92
- #[ rustc_do_not_implement_via_object]
93
89
#[ rustc_coinductive]
94
90
pub trait MetaSized : PointeeSized { }
95
91
96
92
#[ lang = "sized" ]
97
93
#[ fundamental]
98
94
#[ rustc_specialization_trait]
99
- #[ rustc_deny_explicit_impl]
100
- #[ rustc_do_not_implement_via_object]
101
95
#[ rustc_coinductive]
102
96
pub trait Sized : MetaSized { }
103
97
// endregion:sized
@@ -139,7 +133,7 @@ pub mod marker {
139
133
// endregion:derive
140
134
141
135
mod copy_impls {
142
- use super :: Copy ;
136
+ use super :: { Copy , PointeeSized } ;
143
137
144
138
macro_rules! impl_copy {
145
139
( $( $t: ty) * ) => {
@@ -225,6 +219,8 @@ pub mod default {
225
219
226
220
// region:hash
227
221
pub mod hash {
222
+ use crate :: marker:: PointeeSized ;
223
+
228
224
pub trait Hasher { }
229
225
230
226
pub trait Hash : PointeeSized {
@@ -240,6 +236,7 @@ pub mod hash {
240
236
241
237
// region:cell
242
238
pub mod cell {
239
+ use crate :: marker:: PointeeSized ;
243
240
use crate :: mem;
244
241
245
242
#[ lang = "unsafe_cell" ]
@@ -376,7 +373,7 @@ pub mod convert {
376
373
// endregion:from
377
374
378
375
// region:as_ref
379
- pub trait AsRef < T : PointeeSized > : PointeeSized {
376
+ pub trait AsRef < T : crate :: marker :: PointeeSized > : crate :: marker :: PointeeSized {
380
377
fn as_ref ( & self ) -> & T ;
381
378
}
382
379
// endregion:as_ref
@@ -387,6 +384,8 @@ pub mod convert {
387
384
388
385
pub mod mem {
389
386
// region:manually_drop
387
+ use crate :: marker:: PointeeSized ;
388
+
390
389
#[ lang = "manually_drop" ]
391
390
#[ repr( transparent) ]
392
391
pub struct ManuallyDrop < T : PointeeSized > {
@@ -447,7 +446,7 @@ pub mod mem {
447
446
pub mod ptr {
448
447
// region:drop
449
448
#[ lang = "drop_in_place" ]
450
- pub unsafe fn drop_in_place < T : PointeeSized > ( to_drop : * mut T ) {
449
+ pub unsafe fn drop_in_place < T : crate :: marker :: PointeeSized > ( to_drop : * mut T ) {
451
450
unsafe { drop_in_place ( to_drop) }
452
451
}
453
452
pub const unsafe fn read < T > ( src : * const T ) -> T {
@@ -463,20 +462,22 @@ pub mod ptr {
463
462
// region:pointee
464
463
#[ lang = "pointee_trait" ]
465
464
#[ rustc_deny_explicit_impl( implement_via_object = false ) ]
466
- pub trait Pointee : PointeeSized {
465
+ pub trait Pointee : crate :: marker :: PointeeSized {
467
466
#[ lang = "metadata_type" ]
468
467
type Metadata : Copy + Send + Sync + Ord + Hash + Unpin ;
469
468
}
470
469
// endregion:pointee
471
470
// region:non_null
472
471
#[ rustc_layout_scalar_valid_range_start( 1 ) ]
473
472
#[ rustc_nonnull_optimization_guaranteed]
474
- pub struct NonNull < T : PointeeSized > {
473
+ pub struct NonNull < T : crate :: marker :: PointeeSized > {
475
474
pointer : * const T ,
476
475
}
477
476
// region:coerce_unsized
478
- impl < T : PointeeSized , U : PointeeSized > crate :: ops:: CoerceUnsized < NonNull < U > > for NonNull < T > where
479
- T : crate :: marker:: Unsize < U >
477
+ impl < T : crate :: marker:: PointeeSized , U : crate :: marker:: PointeeSized >
478
+ crate :: ops:: CoerceUnsized < NonNull < U > > for NonNull < T >
479
+ where
480
+ T : crate :: marker:: Unsize < U > ,
480
481
{
481
482
}
482
483
// endregion:coerce_unsized
@@ -497,7 +498,7 @@ pub mod ptr {
497
498
pub mod ops {
498
499
// region:coerce_unsized
499
500
mod unsize {
500
- use crate :: marker:: Unsize ;
501
+ use crate :: marker:: { PointeeSized , Unsize } ;
501
502
502
503
#[ lang = "coerce_unsized" ]
503
504
pub trait CoerceUnsized < T > { }
@@ -519,6 +520,8 @@ pub mod ops {
519
520
520
521
// region:deref
521
522
mod deref {
523
+ use crate :: marker:: PointeeSized ;
524
+
522
525
#[ lang = "deref" ]
523
526
pub trait Deref : PointeeSized {
524
527
#[ lang = "deref_target" ]
@@ -1025,7 +1028,7 @@ pub mod ops {
1025
1028
1026
1029
// region:dispatch_from_dyn
1027
1030
mod dispatch_from_dyn {
1028
- use crate :: marker:: Unsize ;
1031
+ use crate :: marker:: { PointeeSized , Unsize } ;
1029
1032
1030
1033
#[ lang = "dispatch_from_dyn" ]
1031
1034
pub trait DispatchFromDyn < T > { }
@@ -1044,6 +1047,8 @@ pub mod ops {
1044
1047
1045
1048
// region:eq
1046
1049
pub mod cmp {
1050
+ use crate :: marker:: PointeeSized ;
1051
+
1047
1052
#[ lang = "eq" ]
1048
1053
pub trait PartialEq < Rhs : PointeeSized = Self > : PointeeSized {
1049
1054
fn eq ( & self , other : & Rhs ) -> bool ;
@@ -1090,6 +1095,8 @@ pub mod cmp {
1090
1095
1091
1096
// region:fmt
1092
1097
pub mod fmt {
1098
+ use crate :: marker:: PointeeSized ;
1099
+
1093
1100
pub struct Error ;
1094
1101
pub type Result = crate :: result:: Result < ( ) , Error > ;
1095
1102
pub struct Formatter < ' a > ;
@@ -1531,6 +1538,8 @@ pub mod iter {
1531
1538
1532
1539
mod traits {
1533
1540
mod iterator {
1541
+ use crate :: marker:: PointeeSized ;
1542
+
1534
1543
#[ doc( notable_trait) ]
1535
1544
#[ lang = "iterator" ]
1536
1545
pub trait Iterator {
0 commit comments