- replaces "move-only" terminology with "noncopyable"
- replaces compiler jargon like "guaranteed parameters"
and "lvalue" with corresponding language-level notions
- simplifies diagnostics about closures.
and probably more.
rdar://109281444
According to SE-377:
consuming cannot be applied to parameters of nonescaping closure type, which by their nature are always borrowed:
// ERROR: cannot `consume` a nonescaping closure
func foo(f: consuming () -> ()) {
}
This commit implements the error message.
rdar://108388132
And adjust contextual parameter modifier parsing in general to be more
properly contextual, so we don't have to reserve `__shared` or `__owned`,
or their successor spellings, as argument labels anymore.