Skip to content

Fix minor stdlib nits #16571

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stdlib/public/core/ContiguousArrayBuffer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ internal func _copyCollectionToContiguousArray<
_uninitializedCount: count,
minimumCapacity: 0)

var p = UnsafeMutableBufferPointer(start: result.firstElementAddress, count: count)
let p = UnsafeMutableBufferPointer(start: result.firstElementAddress, count: count)
var (itr, end) = source._copyContents(initializing: p)

_debugPrecondition(itr.next() == nil,
Expand Down
3 changes: 1 addition & 2 deletions stdlib/public/core/KeyPath.swift
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@ public class AnyKeyPath: Hashable, _AppendKeyPath {
return try f(KeyPathBuffer(base: base))
}

@_inlineable // FIXME(sil-serialize-all)
@_versioned // FIXME(sil-serialize-all)
@inlinable // FIXME(sil-serialize-all)
internal var _storedInlineOffset: Int? {
return withBuffer {
var buffer = $0
Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/core/MemoryLayout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ extension MemoryLayout {
/// result of `offset(of:)` changes to `nil`. That kind of conversion is
/// non-breaking in other contexts, but would trigger a runtime error if the
/// result of `offset(of:)` is force-unwrapped.
@_inlineable // FIXME(sil-serialize-all)
@inlinable // FIXME(sil-serialize-all)
@_transparent
public static func offset(of key: PartialKeyPath<T>) -> Int? {
return key._storedInlineOffset
Expand Down