@@ -141,9 +141,8 @@ unsafe impl<T: Sync + ?Sized> Send for &T {}
141
141
) ]
142
142
#[ fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
143
143
#[ rustc_specialization_trait]
144
- #[ cfg_attr( bootstrap, rustc_deny_explicit_impl( implement_via_object = false ) ) ]
145
- #[ cfg_attr( not( bootstrap) , rustc_deny_explicit_impl) ]
146
- #[ cfg_attr( not( bootstrap) , rustc_do_not_implement_via_object) ]
144
+ #[ rustc_deny_explicit_impl]
145
+ #[ rustc_do_not_implement_via_object]
147
146
#[ rustc_coinductive]
148
147
pub trait Sized {
149
148
// Empty.
@@ -183,9 +182,8 @@ pub trait Sized {
183
182
/// [^1]: Formerly known as *object safe*.
184
183
#[ unstable( feature = "unsize" , issue = "18598" ) ]
185
184
#[ lang = "unsize" ]
186
- #[ cfg_attr( bootstrap, rustc_deny_explicit_impl( implement_via_object = false ) ) ]
187
- #[ cfg_attr( not( bootstrap) , rustc_deny_explicit_impl) ]
188
- #[ cfg_attr( not( bootstrap) , rustc_do_not_implement_via_object) ]
185
+ #[ rustc_deny_explicit_impl]
186
+ #[ rustc_do_not_implement_via_object]
189
187
pub trait Unsize < T : ?Sized > {
190
188
// Empty.
191
189
}
@@ -819,9 +817,8 @@ impl<T: ?Sized> StructuralPartialEq for PhantomData<T> {}
819
817
reason = "this trait is unlikely to ever be stabilized, use `mem::discriminant` instead"
820
818
) ]
821
819
#[ lang = "discriminant_kind" ]
822
- #[ cfg_attr( bootstrap, rustc_deny_explicit_impl( implement_via_object = false ) ) ]
823
- #[ cfg_attr( not( bootstrap) , rustc_deny_explicit_impl) ]
824
- #[ cfg_attr( not( bootstrap) , rustc_do_not_implement_via_object) ]
820
+ #[ rustc_deny_explicit_impl]
821
+ #[ rustc_do_not_implement_via_object]
825
822
pub trait DiscriminantKind {
826
823
/// The type of the discriminant, which must satisfy the trait
827
824
/// bounds required by `mem::Discriminant`.
@@ -962,10 +959,9 @@ marker_impls! {
962
959
#[ unstable( feature = "const_destruct" , issue = "133214" ) ]
963
960
#[ lang = "destruct" ]
964
961
#[ rustc_on_unimplemented( message = "can't drop `{Self}`" , append_const_msg) ]
965
- #[ cfg_attr( bootstrap, rustc_deny_explicit_impl( implement_via_object = false ) ) ]
966
- #[ cfg_attr( not( bootstrap) , rustc_deny_explicit_impl) ]
967
- #[ cfg_attr( not( bootstrap) , rustc_do_not_implement_via_object) ]
968
- #[ cfg_attr( not( bootstrap) , const_trait) ]
962
+ #[ rustc_deny_explicit_impl]
963
+ #[ rustc_do_not_implement_via_object]
964
+ #[ const_trait]
969
965
pub trait Destruct { }
970
966
971
967
/// A marker for tuple types.
@@ -975,9 +971,8 @@ pub trait Destruct {}
975
971
#[ unstable( feature = "tuple_trait" , issue = "none" ) ]
976
972
#[ lang = "tuple_trait" ]
977
973
#[ diagnostic:: on_unimplemented( message = "`{Self}` is not a tuple" ) ]
978
- #[ cfg_attr( bootstrap, rustc_deny_explicit_impl( implement_via_object = false ) ) ]
979
- #[ cfg_attr( not( bootstrap) , rustc_deny_explicit_impl) ]
980
- #[ cfg_attr( not( bootstrap) , rustc_do_not_implement_via_object) ]
974
+ #[ rustc_deny_explicit_impl]
975
+ #[ rustc_do_not_implement_via_object]
981
976
pub trait Tuple { }
982
977
983
978
/// A marker for pointer-like types.
@@ -996,10 +991,9 @@ pub trait Tuple {}
996
991
message = "`{Self}` needs to have the same ABI as a pointer" ,
997
992
label = "`{Self}` needs to be a pointer-like type"
998
993
) ]
999
- #[ cfg_attr ( not ( bootstrap ) , rustc_do_not_implement_via_object) ]
994
+ #[ rustc_do_not_implement_via_object]
1000
995
pub trait PointerLike { }
1001
996
1002
- #[ cfg( not( bootstrap) ) ]
1003
997
marker_impls ! {
1004
998
#[ unstable( feature = "pointer_like_trait" , issue = "none" ) ]
1005
999
PointerLike for
@@ -1086,9 +1080,8 @@ marker_impls! {
1086
1080
reason = "internal trait for implementing various traits for all function pointers"
1087
1081
) ]
1088
1082
#[ lang = "fn_ptr_trait" ]
1089
- #[ cfg_attr( bootstrap, rustc_deny_explicit_impl( implement_via_object = false ) ) ]
1090
- #[ cfg_attr( not( bootstrap) , rustc_deny_explicit_impl) ]
1091
- #[ cfg_attr( not( bootstrap) , rustc_do_not_implement_via_object) ]
1083
+ #[ rustc_deny_explicit_impl]
1084
+ #[ rustc_do_not_implement_via_object]
1092
1085
pub trait FnPtr : Copy + Clone {
1093
1086
/// Returns the address of the function pointer.
1094
1087
#[ lang = "fn_ptr_addr" ]
@@ -1099,7 +1092,6 @@ pub trait FnPtr: Copy + Clone {
1099
1092
#[ rustc_builtin_macro( CoercePointee , attributes( pointee) ) ]
1100
1093
#[ allow_internal_unstable( dispatch_from_dyn, coerce_unsized, unsize) ]
1101
1094
#[ unstable( feature = "derive_coerce_pointee" , issue = "123430" ) ]
1102
- #[ cfg( not( bootstrap) ) ]
1103
1095
pub macro CoercePointee ( $item: item) {
1104
1096
/* compiler built-in */
1105
1097
}
0 commit comments