mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Prepare diagnostics docs for docc generation
Update the diagostic docs so that they can be built with docc:
* Add technologyroot (diagnostics.md) to aggregate all markdown files
* Fixed warnings in a few diagnostics docs
This allows the creation of docc documentation with a single
invocation of docc. It will generate the landing page from
diagnostics.md and include all of the diagnostics as subarticles.
The subarticles are accessible via the name of the markdown file,
which is being used as the ID for these diagnostics.
E.g. existential-any.
The docc docs for these documents can be generated locally with the
following command:
>docc preview --allow-arbitrary-catalog-directories userdocs/diagnostics
This commit is contained in:
1
userdocs/diagnostics/.gitignore
vendored
Normal file
1
userdocs/diagnostics/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.docc-build
|
||||
@@ -1,14 +1,15 @@
|
||||
# `AsyncCallerExecution`
|
||||
|
||||
Proposed in [SE-0461], this feature changes the behavior of nonisolated async
|
||||
This feature changes the behavior of nonisolated async
|
||||
functions to run on the actor to which the caller is isolated (if any) by
|
||||
default, and provides an explicit way to express the execution semantics for
|
||||
these functions:
|
||||
these functions.
|
||||
|
||||
This feature was proposed in [SE-0461](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0461-async-function-isolation.md)
|
||||
|
||||
* The `@execution(concurrent)` attribute specifies that a function must always
|
||||
switch off of an actor to run.
|
||||
This is the default behavior without `AsyncCallerExecution`.
|
||||
* The `@execution(caller)` attribute specifies that a function must always
|
||||
run on the caller's actor.
|
||||
This is the default behavior with `AsyncCallerExecution`.
|
||||
|
||||
[SE-0461]: https://github.com/swiftlang/swift-evolution/blob/main/proposals/0461-async-function-isolation.md
|
||||
|
||||
7
userdocs/diagnostics/diagnostics.md
Normal file
7
userdocs/diagnostics/diagnostics.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Swift Compiler Diagnostics
|
||||
|
||||
@Metadata {
|
||||
@TechnologyRoot
|
||||
}
|
||||
|
||||
Documentation on diagnostics emitted by the compiler.
|
||||
@@ -1,7 +1,9 @@
|
||||
# `ExistentialAny`
|
||||
|
||||
This diagnostic group includes errors and warnings pertaining to the `any` type
|
||||
syntax proposed in [SE-0335].
|
||||
syntax.
|
||||
|
||||
This syntax was proposed in [SE-0335](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0335-existential-any.md).
|
||||
`any` syntax draws a line between constraint types and existential or boxed
|
||||
types.
|
||||
|
||||
@@ -20,5 +22,3 @@ func sillyFunction(collection: Collection) { // error
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
[SE-0335]: https://github.com/swiftlang/swift-evolution/blob/main/proposals/0335-existential-any.md
|
||||
|
||||
Reference in New Issue
Block a user