this was staged in as a warning initially but it was intended to be
an error if it is not written so that we can move to a world where
these pattern matches are done as a borrowing operation instead.
rdar://110908714
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
The reason why we are doing this is that:
1. For non-copyable types, switches are always at +1 for now.
2. non-copyable enums with deinits cannot be switched upon since that would
invalidate the deinit.
So deinits on non-copyable enums are just not useful at this point since you
cannot open the enum.
Once we make it so that you can bind a non-copyable enum at +0, we will
remove this check.
I added an experimental feature MoveOnlyEnumDeinits so tests that validate the
codegen/etc will still work.
rdar://101651138