Rollup merge of #138296 - compiler-errors:deanonymous, r=lcnr
Remove `AdtFlags::IS_ANONYMOUS` and `Copy`/`Clone` condition for anonymous ADT cc #131045, which removed anonymous ADTs from the compiler I forgot more stuff I guess.
This commit is contained in:
commit
954b88ed2a
3 changed files with 1 additions and 18 deletions
|
@ -2231,15 +2231,6 @@ impl<'tcx> SelectionContext<'_, 'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
// `Copy` and `Clone` are automatically implemented for an anonymous adt
|
||||
// if all of its fields are `Copy` and `Clone`
|
||||
ty::Adt(adt, args) if adt.is_anonymous() => {
|
||||
// (*) binder moved here
|
||||
Where(obligation.predicate.rebind(
|
||||
adt.non_enum_variant().fields.iter().map(|f| f.ty(self.tcx(), args)).collect(),
|
||||
))
|
||||
}
|
||||
|
||||
ty::Adt(..) | ty::Alias(..) | ty::Param(..) | ty::Placeholder(..) => {
|
||||
// Fallback to whatever user-defined impls exist in this case.
|
||||
None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue