@@ -140,7 +140,8 @@ unsafe impl<T: Sync + ?Sized> Send for &T {}
140140) ]
141141#[ fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
142142#[ rustc_specialization_trait]
143- #[ rustc_deny_explicit_impl]
143+ #[ cfg_attr( not( bootstrap) , rustc_deny_explicit_impl( implement_via_object = false ) ) ]
144+ #[ cfg_attr( bootstrap, rustc_deny_explicit_impl) ]
144145#[ rustc_coinductive]
145146pub trait Sized {
146147 // Empty.
@@ -173,8 +174,8 @@ pub trait Sized {
173174/// [nomicon-coerce]: ../../nomicon/coercions.html
174175#[ unstable( feature = "unsize" , issue = "18598" ) ]
175176#[ lang = "unsize" ]
176- #[ rustc_deny_explicit_impl]
177- #[ cfg_attr( not ( bootstrap) , rustc_do_not_implement_via_object ) ]
177+ #[ cfg_attr ( not ( bootstrap ) , rustc_deny_explicit_impl( implement_via_object = false ) ) ]
178+ #[ cfg_attr( bootstrap, rustc_deny_explicit_impl ) ]
178179pub trait Unsize < T : ?Sized > {
179180 // Empty.
180181}
@@ -855,8 +856,8 @@ impl<T: ?Sized> StructuralEq for PhantomData<T> {}
855856 reason = "this trait is unlikely to ever be stabilized, use `mem::discriminant` instead"
856857) ]
857858#[ lang = "discriminant_kind" ]
858- #[ rustc_deny_explicit_impl]
859- #[ cfg_attr( not ( bootstrap) , rustc_do_not_implement_via_object ) ]
859+ #[ cfg_attr ( not ( bootstrap ) , rustc_deny_explicit_impl( implement_via_object = false ) ) ]
860+ #[ cfg_attr( bootstrap, rustc_deny_explicit_impl ) ]
860861pub trait DiscriminantKind {
861862 /// The type of the discriminant, which must satisfy the trait
862863 /// bounds required by `mem::Discriminant`.
@@ -961,8 +962,8 @@ marker_impls! {
961962#[ unstable( feature = "const_trait_impl" , issue = "67792" ) ]
962963#[ lang = "destruct" ]
963964#[ rustc_on_unimplemented( message = "can't drop `{Self}`" , append_const_msg) ]
964- #[ rustc_deny_explicit_impl]
965- #[ cfg_attr( not ( bootstrap) , rustc_do_not_implement_via_object ) ]
965+ #[ cfg_attr ( not ( bootstrap ) , rustc_deny_explicit_impl( implement_via_object = false ) ) ]
966+ #[ cfg_attr( bootstrap, rustc_deny_explicit_impl ) ]
966967#[ const_trait]
967968pub trait Destruct { }
968969
@@ -973,8 +974,8 @@ pub trait Destruct {}
973974#[ unstable( feature = "tuple_trait" , issue = "none" ) ]
974975#[ lang = "tuple_trait" ]
975976#[ rustc_on_unimplemented( message = "`{Self}` is not a tuple" ) ]
976- #[ rustc_deny_explicit_impl]
977- #[ cfg_attr( not ( bootstrap) , rustc_do_not_implement_via_object ) ]
977+ #[ cfg_attr ( not ( bootstrap ) , rustc_deny_explicit_impl( implement_via_object = false ) ) ]
978+ #[ cfg_attr( bootstrap, rustc_deny_explicit_impl ) ]
978979pub trait Tuple { }
979980
980981/// A marker for pointer-like types.
@@ -1029,7 +1030,8 @@ impl ConstParamTy for () {}
10291030 reason = "internal trait for implementing various traits for all function pointers"
10301031) ]
10311032#[ lang = "fn_ptr_trait" ]
1032- #[ rustc_deny_explicit_impl]
1033+ #[ cfg_attr( not( bootstrap) , rustc_deny_explicit_impl( implement_via_object = false ) ) ]
1034+ #[ cfg_attr( bootstrap, rustc_deny_explicit_impl) ]
10331035pub trait FnPtr : Copy + Clone {
10341036 /// Returns the address of the function pointer.
10351037 #[ lang = "fn_ptr_addr" ]
0 commit comments