@@ -106,7 +106,6 @@ class BitwiseCopyableStorageVisitor : public StorageVisitor {
106106
107107 bool visitMemberDecl (ValueDecl *storage, Type ty);
108108 bool visitMemberType (Type type, SourceLoc loc);
109- bool isUnchecked (ProtocolConformanceRef conformance);
110109 bool visitNonconformingMemberType (Type type, SourceLoc loc);
111110 void emitNonconformingMemberTypeDiagnostic (Type ty, SourceLoc loc);
112111};
@@ -137,13 +136,6 @@ bool BitwiseCopyableStorageVisitor::visitMemberType(Type ty, SourceLoc loc) {
137136 return visitNonconformingMemberType (ty, loc);
138137 }
139138
140- if (isImplicit (check) && isUnchecked (conformance)) {
141- // Do not automatically derive conformance if one of the field's
142- // conformance is @unchecked.
143- invalid = true ;
144- return true ;
145- }
146-
147139 // Walk the conformance, diagnosing any missing BitwiseCopyable conformances.
148140 bool anyMissing = false ;
149141 conformance.forEachMissingConformance (
@@ -158,20 +150,6 @@ bool BitwiseCopyableStorageVisitor::visitMemberType(Type ty, SourceLoc loc) {
158150 return anyMissing;
159151}
160152
161- bool BitwiseCopyableStorageVisitor::isUnchecked (
162- ProtocolConformanceRef conformance) {
163- if (!conformance.isConcrete ())
164- return false ;
165- auto concrete = conformance.getConcrete ();
166- assert (concrete);
167- auto *root = concrete->getRootConformance ();
168- assert (root);
169- auto *normal = dyn_cast<NormalProtocolConformance>(root);
170- if (!normal)
171- return false ;
172- return normal->isUnchecked ();
173- }
174-
175153bool BitwiseCopyableStorageVisitor::visitNonconformingMemberType (
176154 Type ty, SourceLoc loc) {
177155 if (ty->hasError ())
0 commit comments