mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Protocol conformances have a handful attributes that can apply to them directly, including @unchecked (for Sendable), @preconcurrency, and @retroactive. Generalize this into an option set that we carry around, so it's a bit easier to add them, as well as reworking the serialization logic to deal with an arbitrary number of such options. Use this generality to add support for @unsafe conformances, which are needed when unsafe witnesses are used to conform to safe requirements. Implement general support for @unsafe conformances, including producing a single diagnostic per missing @unsafe that provides a Fix-It and collects together all of the unsafe witnesses as notes.
40 KiB
40 KiB