@@ -140,7 +140,8 @@ unsafe impl<T: Sync + ?Sized> Send for &T {}
140
140
) ]
141
141
#[ fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
142
142
#[ 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) ]
144
145
#[ rustc_coinductive]
145
146
pub trait Sized {
146
147
// Empty.
@@ -173,8 +174,8 @@ pub trait Sized {
173
174
/// [nomicon-coerce]: ../../nomicon/coercions.html
174
175
#[ unstable( feature = "unsize" , issue = "18598" ) ]
175
176
#[ 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 ) ]
178
179
pub trait Unsize < T : ?Sized > {
179
180
// Empty.
180
181
}
@@ -855,8 +856,8 @@ impl<T: ?Sized> StructuralEq for PhantomData<T> {}
855
856
reason = "this trait is unlikely to ever be stabilized, use `mem::discriminant` instead"
856
857
) ]
857
858
#[ 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 ) ]
860
861
pub trait DiscriminantKind {
861
862
/// The type of the discriminant, which must satisfy the trait
862
863
/// bounds required by `mem::Discriminant`.
@@ -961,8 +962,8 @@ marker_impls! {
961
962
#[ unstable( feature = "const_trait_impl" , issue = "67792" ) ]
962
963
#[ lang = "destruct" ]
963
964
#[ 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 ) ]
966
967
#[ const_trait]
967
968
pub trait Destruct { }
968
969
@@ -973,8 +974,8 @@ pub trait Destruct {}
973
974
#[ unstable( feature = "tuple_trait" , issue = "none" ) ]
974
975
#[ lang = "tuple_trait" ]
975
976
#[ 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 ) ]
978
979
pub trait Tuple { }
979
980
980
981
/// A marker for pointer-like types.
@@ -1029,7 +1030,8 @@ impl ConstParamTy for () {}
1029
1030
reason = "internal trait for implementing various traits for all function pointers"
1030
1031
) ]
1031
1032
#[ 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) ]
1033
1035
pub trait FnPtr : Copy + Clone {
1034
1036
/// Returns the address of the function pointer.
1035
1037
#[ lang = "fn_ptr_addr" ]
0 commit comments