diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-03-11 19:35:33 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-11 19:35:33 +0100 |
| commit | 954b88ed2aeeaaa2ccb261097f36379b244fc4ad (patch) | |
| tree | d47d95f6abed6b2a611b021865fcecce6ab027ca /compiler/rustc_trait_selection/src | |
| parent | 16ff824133a0d7473a68066969fabceb522c8109 (diff) | |
| parent | f525b173edd08cf68f025a5b2db38b665887771d (diff) | |
| download | rust-954b88ed2aeeaaa2ccb261097f36379b244fc4ad.tar.gz rust-954b88ed2aeeaaa2ccb261097f36379b244fc4ad.zip | |
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.
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/select/mod.rs | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/select/mod.rs b/compiler/rustc_trait_selection/src/traits/select/mod.rs index 0a54b8468fe..e1adabbeaa6 100644 --- a/compiler/rustc_trait_selection/src/traits/select/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/select/mod.rs @@ -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 |
