De-underscore @frozen, apply it to structs (#24185)

* De-underscore @frozen for enums

* Add @frozen for structs, deprecate @_fixed_layout for them

* Switch usage from _fixed_layout to frozen
This commit is contained in:
Ben Cohen
2019-05-30 17:55:37 -07:00
committed by GitHub
parent 5aca7793be
commit e9d4687e31
173 changed files with 755 additions and 622 deletions

View File

@@ -91,7 +91,7 @@ public func max<T : Comparable>(_ x: T, _ y: T, _ z: T, _ rest: T...) -> T {
/// }
/// // Prints "0: foo"
/// // Prints "1: bar"
@_fixed_layout
@frozen
public struct EnumeratedSequence<Base: Sequence> {
@usableFromInline
internal var _base: Base
@@ -118,7 +118,7 @@ extension EnumeratedSequence {
///
/// To create an instance, call
/// `enumerated().makeIterator()` on a sequence or collection.
@_fixed_layout
@frozen
public struct Iterator {
@usableFromInline
internal var _base: Base.Iterator