Proposed change of plans for read accessors

Going over the stdlib looking for places to adopt @_borrowed (strawman spelling; see Add a @_borrowed attribute to force the use of an opaque read accessor by rjmccall · Pull Request #20403 · apple/swift · GitHub or the associated forum thread), there's not much.

At least arguably required for move-only types:

  • Collection.subscript(Index) and its refinement on MutableCollection
  • _SequenceWrapper._base (unless this should go the opposite direction and become a consuming method)

The following are possible minor optimizations:

  • Error._domain, which will almost exclusively return a constant value — but using read in that case might not actually be an optimization over doing a no-op retain/release
  • RawRepresentable.rawValue, which I think will usually return a constant value, and which may need to be borrowed for move-only correctness
  • _AnyHashableBox._canonicalBox (not sure about this one at all)
  • Encoder.codingPath and KeyedEncodingContainerProtocol.codingPath
  • LazySequenceProtocol.elements and LazyCollectionProtocol.elements