Skip to content

[SR-1952] Implement SE-0103: Make non-escaping closures the default #44561

@lattner

Description

@lattner
mannequin
Previous ID SR-1952
Radar None
Original Reporter @lattner
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee @milseman
Priority Medium

md5: 1cc9c8e0e14e6e4c7c3f195393b327f5

relates to:

  • SR-2180 withUnsafeMutablePointer methods should accept noescape closures

Issue Description:

SE-0103 was accepted, now we need an implementation. It would make sense to stage this in in the following steps:

  • Introduce the new @escaping attribute.

  • Introduce a new compiler warning that triggers on parameters that are not marked @NoEscape, which fixits to introducing the @escaping attribute.

  • Update other swift.org projects to use @escaping where necessary.

  • Switch the default, and start warning about @NoEscape with a fixit to remove it.

  • Upgrade the warning about @NoEscape to be an error with a fixit to remove it.

Metadata

Metadata

Assignees

Labels

bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itself

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions