mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
If an expression refers to noncopyable storage, then default to performing a borrowing switch, where `let` bindings in patterns borrow out of the matched value. If an expression refers to a temporary value or explicitly uses the `consume` keyword, then perform a consuming switch, where `let` bindings take ownership of corresponding parts of the matched value. Allow `_borrowing` to still be used to explicitly bind a pattern variable as a borrow, with no-implicit-copy semantics for copyable values.
26 KiB
26 KiB