When Swift offers to apply protocol stubs in Xcode, the fix-it produced may include the __consuming and __owned modifiers, which are not currently a supported part of the language and are not intended to be used in most conformances even once they are officially added.
Steps To Reproduce:
Although this is a compiler bug, the printed form of compiler diagnostics doesn't display fix-its in sufficient detail to easily demonstrate it. It's most easily reproduced in an Xcode with an appropriate toolchain:
1. Create a new Xcode project with this code in a Swift source file:
2. Build it.
3. Click the error badge on the extension line, then click the “Fix” button to apply the fix-it.
Some of the stubbed declarations include __consuming and/or __owned modifiers, such as:
I would not expect Swift to suggest these modifiers, since they aren’t officially part of the language. Instead I would expect it to drop these keywords:
Even after we fully support move-only types, I would expect the protocol stubs for a non-move-only conformance to remove unnecessary move-only–related modifiers so that users don't need to worry about this complexity.