mirror of
https://github.com/apple/swift-certificates
synced 2026-11-22 04:20:39 +00:00
Motivation
Nightly compilers start complaining about retroactive conformances.
Modifications
- move conformance to declaring module
- optimise code to not allocate
Result
no warning, optimal generated code for:
```swift
func foo1(int: Int) -> _TinyArray<Int> {
[int]
}
```
compiles down to:
```
output.foo1(int: Swift.Int) -> output._TinyArray<Swift.Int>:
mov rax, rdi
xor edx, edx
ret
```
https://godbolt.org/z/a91fPe6or