mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Don’t recommend @preconcurrency on audited imports
If a type is explicitly non-Sendable, we don’t want to recommend softening errors with `@preconcurrency import` (even thought that would still work), because these probably represent *real* errors that you ought to fix. And at the extreme end of this, if a module is built with `-warn-concurrency` or `-swift-version 6`, *all* of its types should be treated as though they have explicit sendability, since we assume the entire module has been audited. (Eventually, we plan to do this at module build time by actually serializing out unavailable conformances rather than by looking at the settings used to build the module, but we aren’t there quite yet.) Implement this and test it by checking that the preconcurrency sendable tests never recommend adding `@preconcurrency` to an import of `StrictModule`, even when we do the same illegal things with it that cause that remark to be printed for `NonStrictModule`.
This commit is contained in:
@@ -1 +1,3 @@
|
||||
public struct StrictStruct: Hashable { }
|
||||
|
||||
open class StrictClass { }
|
||||
|
||||
Reference in New Issue
Block a user