Skip to content

Commit cfbfadf

Browse files
committed
[Gardening] Standardize edu note markdown headers
1 parent 976a1d7 commit cfbfadf

File tree

5 files changed

+5
-10
lines changed

5 files changed

+5
-10
lines changed

userdocs/diagnostics/associated-type-requirements.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
Using Protocols with `Self` or Associated Type Requirements
2-
---
1+
# Using Protocols with `Self` or Associated Type Requirements
32
Protocols in Swift may be used as types, as part of a generic constraint, or as part of an opaque result type.
43
```
54
// CustomStringConvertible can be used as a type.

userdocs/diagnostics/complex-closure-inference.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
Inferring Closure Types
2-
---
1+
# Inferring Closure Types
32
If a closure contains a single expression, Swift will consider its body in addition to its signature and the surrounding context when performing type inference. For example, in the following code the type of `doubler` is inferred to be `(Int) -> Int` using only its body:
43
```
54
let doubler = {

userdocs/diagnostics/dynamic-callable-requirements.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
@dynamicCallable Implementation Requirements
2-
---
1+
# @dynamicCallable Implementation Requirements
32
If a type is marked with the `@dynamicCallable` attribute, it must provide a valid implementation of `dynamicallyCall(withArguments:)`, `dynamicallyCall(withKeywordArguments:)`, or both. If it fails to do so, an error will be reported at compile-time. Note that an implementation of `dynamicallyCall(withKeywordArguments:)` is required to support calls with keyword arguments.
43

54
To be considered valid, an implementation of `dynamicallyCall(withArguments:)` must:

userdocs/diagnostics/nominal-types.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
## Nominal types
2-
***
1+
# Nominal types
32
In Swift, a type is considered a nominal type if it is named. In other words, it has been defined by declaring the type somewhere in code. Examples of nominal types include classes, structs and enums, all of which must be declared before using them. Nominal types are an important concept in Swift because they can be extended, explicitly initialized using the `MyType()` syntax, and may conform to protocols.
43

54
In contrast, non-nominal types have none of these capabilities. A non-nominal type is any type which is not nominal. They are sometimes called "structural types" because they are usually obtained by composing other types. Examples include function types like `(Int) -> (String)`, tuple types like `(Int, String)`, metatypes like `Int.Type`, and special types like `Any` and `AnyObject`.

userdocs/diagnostics/property-wrapper-requirements.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
Property Wrapper Implementation Requirements
2-
---
1+
# Property Wrapper Implementation Requirements
32
If a type is marked with the `@propertyWrapper` attribute, it must meet certain requirements to be a valid property wrapper.
43

54
First, all property wrapper types must have a property named `wrappedValue`. This property cannot be static and must have the same access level as the property wrapper type. If the property wrapper provides a `projectedValue` property, it is subject to the same requirements.

0 commit comments

Comments
 (0)