mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Allow any declaration to be marked with `@unsafe`, meaning that it
involves unsafe code. This also extends to C declarations marked with
the `swift_attr("unsafe")` attribute.
Under a separate experimental flag (`DisallowUnsafe`), diagnose any
attempt to use an `@unsafe` declaration or any unsafe language feature
(such as `unowned(unsafe)`, `@unchecked Sendable`). This begins to
define a "safe" mode in Swift that prohibits memory-unsafe constructs.
3 lines
49 B
Plaintext
3 lines
49 B
Plaintext
module unsafe_decls {
|
|
header "unsafe_decls.h"
|
|
} |