Skip to content

Commit 3f16623

Browse files
authored
Merge pull request swiftlang#75365 from DougGregor/disable-preconcurrency-import-no-effect-warning-6.0
2 parents 9c40c25 + d6658a4 commit 3f16623

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

lib/Sema/TypeCheckConcurrency.cpp

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,24 +1007,8 @@ bool swift::diagnoseSendabilityErrorBasedOn(
10071007
}
10081008

10091009
void swift::diagnoseUnnecessaryPreconcurrencyImports(SourceFile &sf) {
1010-
if (!shouldDiagnosePreconcurrencyImports(sf))
1011-
return;
1012-
1013-
ASTContext &ctx = sf.getASTContext();
1014-
1015-
if (ctx.TypeCheckerOpts.SkipFunctionBodies != FunctionBodySkipping::None)
1016-
return;
1017-
1018-
for (const auto &import : sf.getImports()) {
1019-
if (import.options.contains(ImportFlags::Preconcurrency) &&
1020-
import.importLoc.isValid() &&
1021-
!sf.hasImportUsedPreconcurrency(import)) {
1022-
ctx.Diags.diagnose(
1023-
import.importLoc, diag::remove_predates_concurrency_import,
1024-
import.module.importedModule->getName())
1025-
.fixItRemove(import.preconcurrencyRange);
1026-
}
1027-
}
1010+
// NOTE: Disabled in Swift 6.0.
1011+
return;
10281012
}
10291013

10301014
/// Produce a diagnostic for a single instance of a non-Sendable type where

test/Concurrency/predates_concurrency_import.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
@preconcurrency import NonStrictModule
1414
@_predatesConcurrency import StrictModule // expected-warning{{'@_predatesConcurrency' has been renamed to '@preconcurrency'}}
1515
@preconcurrency import OtherActors
16-
// expected-warning@-1{{'@preconcurrency' attribute on module 'OtherActors' has no effect}}{{1-17=}}
1716

1817
@preconcurrency
1918
class MyPredatesConcurrencyClass { }

0 commit comments

Comments
 (0)