Skip to content

Commit f23c339

Browse files
committed
Sema: remove more unneeded legacy code
(cherry picked from commit 84a44f8)
1 parent f2cc653 commit f23c339

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

lib/AST/ConformanceLookup.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,6 @@ ModuleDecl::lookupExistentialConformance(Type type, ProtocolDecl *protocol) {
111111
return ProtocolConformanceRef::forInvalid();
112112
}
113113

114-
if (protocol->isSpecificProtocol(KnownProtocolKind::Copyable)
115-
&& !ctx.LangOpts.hasFeature(Feature::NoncopyableGenerics)) {
116-
// Prior to noncopyable generics, all existentials conform to Copyable.
117-
return ProtocolConformanceRef(
118-
ctx.getBuiltinConformance(type, protocol,
119-
BuiltinConformanceKind::Synthesized));
120-
}
121-
122114
auto layout = type->getExistentialLayout();
123115

124116
// Due to an IRGen limitation, witness tables cannot be passed from an
@@ -503,12 +495,6 @@ LookupConformanceInModuleRequest::evaluate(
503495
// archetype's list of conformances, or if the archetype has a superclass
504496
// constraint and the superclass conforms to the protocol.
505497
if (auto archetype = type->getAs<ArchetypeType>()) {
506-
507-
// Without noncopyable generics, all archetypes are Copyable
508-
if (!ctx.LangOpts.hasFeature(Feature::NoncopyableGenerics))
509-
if (protocol->isSpecificProtocol(KnownProtocolKind::Copyable))
510-
return ProtocolConformanceRef(protocol);
511-
512498
// The generic signature builder drops conformance requirements that are made
513499
// redundant by a superclass requirement, so check for a concrete
514500
// conformance first, since an abstract conformance might not be

0 commit comments

Comments
 (0)