swift
4fa7e136 - Add Feature: NonescapableAccessorOnTrivial

Commit
135 days ago
Add Feature: NonescapableAccessorOnTrivial To guard the new UnsafeMutablePointer.mutableSpan APIs. This allows older compilers to ignore the new APIs. Otherwise, the type checker will crash on the synthesized _read accessor for a non-Escapable type: error: cannot infer lifetime dependence on the '_read' accessor because 'self' is BitwiseCopyable, specify '@lifetime(borrow self)' I don't know why the _read is synthesized in these cases, but apparently it's always been that way. Fixes: rdar://153773093 ([nonescapable] add a compiler feature to guard ~Escapable accessors when self is trivial) (cherry picked from commit cc357f4f32402769a25d46c3d12129aea108ffbc)
Author
Committer
Parents
Loading