mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Pattern matching as currently implemented is consuming, but that's not necessarily what we want to be the default behavior when borrowing pattern matching is implemented. When a binding of noncopyable type is pattern-matched, require it to be annotated with the `consume` operator explicitly. That way, when we introduce borrowing pattern matching later, we have the option to make `switch x` do the right thing without subtly changing the behavior of existing code. rdar://110073984
230 KiB
230 KiB