@@ -96,6 +96,7 @@ unsafe impl<T: Sync + ?Sized> Send for &T {}
9696) ]
9797#[ fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
9898#[ rustc_specialization_trait]
99+ #[ cfg_attr( not( bootstrap) , rustc_deny_explicit_impl) ]
99100pub trait Sized {
100101 // Empty.
101102}
@@ -127,6 +128,7 @@ pub trait Sized {
127128/// [nomicon-coerce]: ../../nomicon/coercions.html
128129#[ unstable( feature = "unsize" , issue = "27732" ) ]
129130#[ lang = "unsize" ]
131+ #[ cfg_attr( not( bootstrap) , rustc_deny_explicit_impl) ]
130132pub trait Unsize < T : ?Sized > {
131133 // Empty.
132134}
@@ -693,6 +695,7 @@ impl<T: ?Sized> StructuralEq for PhantomData<T> {}
693695 reason = "this trait is unlikely to ever be stabilized, use `mem::discriminant` instead"
694696) ]
695697#[ lang = "discriminant_kind" ]
698+ #[ cfg_attr( not( bootstrap) , rustc_deny_explicit_impl) ]
696699pub trait DiscriminantKind {
697700 /// The type of the discriminant, which must satisfy the trait
698701 /// bounds required by `mem::Discriminant`.
@@ -793,6 +796,7 @@ impl<T: ?Sized> Unpin for *mut T {}
793796#[ lang = "destruct" ]
794797#[ rustc_on_unimplemented( message = "can't drop `{Self}`" , append_const_msg) ]
795798#[ const_trait]
799+ #[ cfg_attr( not( bootstrap) , rustc_deny_explicit_impl) ]
796800pub trait Destruct { }
797801
798802/// A marker for tuple types.
@@ -802,6 +806,7 @@ pub trait Destruct {}
802806#[ unstable( feature = "tuple_trait" , issue = "none" ) ]
803807#[ lang = "tuple_trait" ]
804808#[ rustc_on_unimplemented( message = "`{Self}` is not a tuple" ) ]
809+ #[ cfg_attr( not( bootstrap) , rustc_deny_explicit_impl) ]
805810pub trait Tuple { }
806811
807812/// Implementations of `Copy` for primitive types.
0 commit comments