File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -204,6 +204,18 @@ them.
204204 C23, in which case we should be able to use it and avoid the need for explicit
205205 types in the capture list. ([ rdar://153389205] ( rdar://153389205 ) )
206206
207+ - Explicitly marking the body closure as requiring explicit captures
208+
209+ Currently, if the body closure implicitly captures a value, the diagnostic the
210+ compiler provides is a bit opaque:
211+
212+ > 🛑 A C function pointer cannot be formed from a closure that captures context
213+
214+ In the future, it may be possible to annotate the body closure with an
215+ attribute, keyword, or other decoration that tells the compiler we need an
216+ explicit capture list, which would allow it to provide a clearer diagnostic if
217+ a value is implicitly captured.
218+
207219- Supporting capturing values that do not conform to ` Codable `
208220
209221 Alternatives to ` Codable ` exist or have been proposed, such as
You can’t perform that action at this time.
0 commit comments