Skip to content

Commit 7a8ee06

Browse files
committed
drop the Copyable check when encountering move-only attr
this needs moer care and not required to enable the feature right now.
1 parent e56cb0b commit 7a8ee06

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

lib/Sema/TypeCheckAttr.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2159,15 +2159,6 @@ void AttributeChecker::visitFinalAttr(FinalAttr *attr) {
21592159
}
21602160

21612161
void AttributeChecker::visitMoveOnlyAttr(MoveOnlyAttr *attr) {
2162-
#ifndef NDEBUG
2163-
// Try to catch uses of @_moveOnly when we don't have the Copyable protocol.
2164-
// This can only happen in rare circumstances with test cases where you're
2165-
// building with -parse-stdlib. You need to also specify that you're building
2166-
// the Swift module (`-module-name Swift`) and then explicitly define Copyable
2167-
if (!D->getASTContext().getProtocol(KnownProtocolKind::Copyable))
2168-
llvm_unreachable("must define Copyable protocol when using -parse-stdlib");
2169-
#endif
2170-
21712162
if (!D->getASTContext().supportsMoveOnlyTypes())
21722163
D->diagnose(diag::moveOnly_requires_lexical_lifetimes);
21732164

0 commit comments

Comments
 (0)