File tree 3 files changed +1
-18
lines changed
rustc_trait_selection/src/traits/select
3 files changed +1
-18
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,6 @@ bitflags::bitflags! {
53
53
const IS_VARIANT_LIST_NON_EXHAUSTIVE = 1 << 8 ;
54
54
/// Indicates whether the type is `UnsafeCell`.
55
55
const IS_UNSAFE_CELL = 1 << 9 ;
56
- /// Indicates whether the type is anonymous.
57
- const IS_ANONYMOUS = 1 << 10 ;
58
56
}
59
57
}
60
58
rustc_data_structures:: external_bitflags_debug! { AdtFlags }
@@ -402,12 +400,6 @@ impl<'tcx> AdtDef<'tcx> {
402
400
self . flags ( ) . contains ( AdtFlags :: IS_MANUALLY_DROP )
403
401
}
404
402
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
-
411
403
/// Returns `true` if this type has a destructor.
412
404
pub fn has_dtor ( self , tcx : TyCtxt < ' tcx > ) -> bool {
413
405
self . destructor ( tcx) . is_some ( )
Original file line number Diff line number Diff line change @@ -1151,7 +1151,7 @@ pub struct VariantDef {
1151
1151
/// `DefId` that identifies the variant's constructor.
1152
1152
/// If this variant is a struct variant, then this is `None`.
1153
1153
pub ctor : Option < ( CtorKind , DefId ) > ,
1154
- /// Variant or struct name, maybe empty for anonymous adt (struct or union) .
1154
+ /// Variant or struct name.
1155
1155
pub name : Symbol ,
1156
1156
/// Discriminant of this variant.
1157
1157
pub discr : VariantDiscr ,
Original file line number Diff line number Diff line change @@ -2231,15 +2231,6 @@ impl<'tcx> SelectionContext<'_, 'tcx> {
2231
2231
}
2232
2232
}
2233
2233
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
-
2243
2234
ty:: Adt ( ..) | ty:: Alias ( ..) | ty:: Param ( ..) | ty:: Placeholder ( ..) => {
2244
2235
// Fallback to whatever user-defined impls exist in this case.
2245
2236
None
You can’t perform that action at this time.
0 commit comments