@@ -141,9 +141,8 @@ unsafe impl<T: Sync + ?Sized> Send for &T {}
141141) ]
142142#[ fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
143143#[ 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]
147146#[ rustc_coinductive]
148147pub trait Sized {
149148 // Empty.
@@ -183,9 +182,8 @@ pub trait Sized {
183182/// [^1]: Formerly known as *object safe*.
184183#[ unstable( feature = "unsize" , issue = "18598" ) ]
185184#[ 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]
189187pub trait Unsize < T : ?Sized > {
190188 // Empty.
191189}
@@ -819,9 +817,8 @@ impl<T: ?Sized> StructuralPartialEq for PhantomData<T> {}
819817 reason = "this trait is unlikely to ever be stabilized, use `mem::discriminant` instead"
820818) ]
821819#[ 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]
825822pub trait DiscriminantKind {
826823 /// The type of the discriminant, which must satisfy the trait
827824 /// bounds required by `mem::Discriminant`.
@@ -962,10 +959,9 @@ marker_impls! {
962959#[ unstable( feature = "const_destruct" , issue = "133214" ) ]
963960#[ lang = "destruct" ]
964961#[ 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]
969965pub trait Destruct { }
970966
971967/// A marker for tuple types.
@@ -975,9 +971,8 @@ pub trait Destruct {}
975971#[ unstable( feature = "tuple_trait" , issue = "none" ) ]
976972#[ lang = "tuple_trait" ]
977973#[ 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]
981976pub trait Tuple { }
982977
983978/// A marker for pointer-like types.
@@ -996,10 +991,9 @@ pub trait Tuple {}
996991 message = "`{Self}` needs to have the same ABI as a pointer" ,
997992 label = "`{Self}` needs to be a pointer-like type"
998993) ]
999- #[ cfg_attr ( not ( bootstrap ) , rustc_do_not_implement_via_object) ]
994+ #[ rustc_do_not_implement_via_object]
1000995pub trait PointerLike { }
1001996
1002- #[ cfg( not( bootstrap) ) ]
1003997marker_impls ! {
1004998 #[ unstable( feature = "pointer_like_trait" , issue = "none" ) ]
1005999 PointerLike for
@@ -1086,9 +1080,8 @@ marker_impls! {
10861080 reason = "internal trait for implementing various traits for all function pointers"
10871081) ]
10881082#[ 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]
10921085pub trait FnPtr : Copy + Clone {
10931086 /// Returns the address of the function pointer.
10941087 #[ lang = "fn_ptr_addr" ]
@@ -1099,7 +1092,6 @@ pub trait FnPtr: Copy + Clone {
10991092#[ rustc_builtin_macro( CoercePointee , attributes( pointee) ) ]
11001093#[ allow_internal_unstable( dispatch_from_dyn, coerce_unsized, unsize) ]
11011094#[ unstable( feature = "derive_coerce_pointee" , issue = "123430" ) ]
1102- #[ cfg( not( bootstrap) ) ]
11031095pub macro CoercePointee ( $item: item) {
11041096 /* compiler built-in */
11051097}
0 commit comments