@@ -1065,6 +1065,10 @@ static const char *getImportFailureString(swift::serialization::Status status) {
1065
1065
case swift::serialization::Status::NotInOSSA:
1066
1066
return " The module file was not compiled with -enable-ossa-modules when it "
1067
1067
" was required to do so." ;
1068
+ case swift::serialization::Status::NotUsingNoncopyableGenerics:
1069
+ return " The module file was not compiled with "
1070
+ " -enable-experimental-feature NoncopyableGenerics when it "
1071
+ " was required to do so." ;
1068
1072
case swift::serialization::Status::SDKMismatch:
1069
1073
return " The module file was built with a different SDK version." ;
1070
1074
}
@@ -1248,8 +1252,10 @@ static bool DeserializeAllCompilerFlags(swift::CompilerInvocation &invocation,
1248
1252
for (; !buf.empty (); buf = buf.substr (info.bytes )) {
1249
1253
llvm::SmallVector<swift::serialization::SearchPath> searchPaths;
1250
1254
swift::serialization::ExtendedValidationInfo extended_validation_info;
1255
+ auto &langOpts = invocation.getLangOptions ();
1251
1256
info = swift::serialization::validateSerializedAST (
1252
1257
buf, invocation.getSILOptions ().EnableOSSAModules ,
1258
+ langOpts.hasFeature (swift::Feature::NoncopyableGenerics),
1253
1259
/* requiredSDK*/ StringRef (), &extended_validation_info,
1254
1260
/* dependencies*/ nullptr , &searchPaths);
1255
1261
bool invalid_ast = info.status != swift::serialization::Status::Valid;
@@ -3383,7 +3389,8 @@ swift::ASTContext *SwiftASTContext::GetASTContext() {
3383
3389
std::make_unique<swift::ModuleInterfaceCheckerImpl>(*m_ast_context_ap,
3384
3390
moduleCachePath, prebuiltModuleCachePath,
3385
3391
swift::ModuleInterfaceLoaderOptions (),
3386
- swift::RequireOSSAModules_t (GetSILOptions ())));
3392
+ swift::RequireOSSAModules_t (GetSILOptions ()),
3393
+ swift::RequireNoncopyableGenerics_t (GetLanguageOptions ())));
3387
3394
3388
3395
// 2. Create and install the module interface loader.
3389
3396
//
0 commit comments