mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
ManualOwnership: provide ability to apply to entire compilation unit
With this patch, I'm flipping the polarity of things. The flag `-enable-experimental-feature ManualOwnership` now turns on the diagnostics, but they're all silenced by default. So, you need to add -Wwarning or -Werror to your build settings to turn on the specific diagnostics you care about. These are the diagnostic groups relevant to the feature: - SemanticCopies aka "explicit copies mode" - DynamicExclusivity For example, the build setting `-Werror SemanticCopies` now gives you errors about explicit copies, just as before, but now you can make them just warnings with -Wwarning. To opt-out a declaration from everything when using the feature, use @_noManualOwnership. @_manualOwnership is no longer an attribute as a result. resolves rdar://163372569
This commit is contained in:
@@ -2145,9 +2145,7 @@ ERROR(attr_static_exclusive_only_mutating,none,
|
||||
ERROR(attr_static_exclusive_no_setters,none,
|
||||
"variable of type %0 must not have a setter", (Type))
|
||||
|
||||
// @_manualOwnership
|
||||
ERROR(attr_manual_ownership_experimental,none,
|
||||
"'@_manualOwnership' requires '-enable-experimental-feature ManualOwnership'", ())
|
||||
// ManualOwnership
|
||||
ERROR(attr_manual_ownership_noimplicitcopy,none,
|
||||
"'@_noImplicitCopy' cannot be used with ManualOwnership", ())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user