File tree Expand file tree Collapse file tree 3 files changed +1
-18
lines changed
rustc_trait_selection/src/traits/select Expand file tree Collapse file tree 3 files changed +1
-18
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,6 @@ bitflags::bitflags! {
5353 const IS_VARIANT_LIST_NON_EXHAUSTIVE = 1 << 8 ;
5454 /// Indicates whether the type is `UnsafeCell`.
5555 const IS_UNSAFE_CELL = 1 << 9 ;
56- /// Indicates whether the type is anonymous.
57- const IS_ANONYMOUS = 1 << 10 ;
5856 }
5957}
6058rustc_data_structures:: external_bitflags_debug! { AdtFlags }
@@ -402,12 +400,6 @@ impl<'tcx> AdtDef<'tcx> {
402400 self . flags ( ) . contains ( AdtFlags :: IS_MANUALLY_DROP )
403401 }
404402
405- /// Returns `true` if this is an anonymous adt
406- #[ inline]
407- pub fn is_anonymous ( self ) -> bool {
408- self . flags ( ) . contains ( AdtFlags :: IS_ANONYMOUS )
409- }
410-
411403 /// Returns `true` if this type has a destructor.
412404 pub fn has_dtor ( self , tcx : TyCtxt < ' tcx > ) -> bool {
413405 self . destructor ( tcx) . is_some ( )
Original file line number Diff line number Diff line change @@ -1151,7 +1151,7 @@ pub struct VariantDef {
11511151 /// `DefId` that identifies the variant's constructor.
11521152 /// If this variant is a struct variant, then this is `None`.
11531153 pub ctor : Option < ( CtorKind , DefId ) > ,
1154- /// Variant or struct name, maybe empty for anonymous adt (struct or union) .
1154+ /// Variant or struct name.
11551155 pub name : Symbol ,
11561156 /// Discriminant of this variant.
11571157 pub discr : VariantDiscr ,
Original file line number Diff line number Diff line change @@ -2231,15 +2231,6 @@ impl<'tcx> SelectionContext<'_, 'tcx> {
22312231 }
22322232 }
22332233
2234- // `Copy` and `Clone` are automatically implemented for an anonymous adt
2235- // if all of its fields are `Copy` and `Clone`
2236- ty:: Adt ( adt, args) if adt. is_anonymous ( ) => {
2237- // (*) binder moved here
2238- Where ( obligation. predicate . rebind (
2239- adt. non_enum_variant ( ) . fields . iter ( ) . map ( |f| f. ty ( self . tcx ( ) , args) ) . collect ( ) ,
2240- ) )
2241- }
2242-
22432234 ty:: Adt ( ..) | ty:: Alias ( ..) | ty:: Param ( ..) | ty:: Placeholder ( ..) => {
22442235 // Fallback to whatever user-defined impls exist in this case.
22452236 None
You can’t perform that action at this time.
0 commit comments