Skip to content

Common Errors Editing #111

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 13 commits into from
Jun 28, 2024
Prev Previous commit
Next Next commit
Downgrade diagnostics
  • Loading branch information
mattmassicotte committed Jun 27, 2024
commit 528c7fb96ebbb31db02a4d06be73ad8256612c94
8 changes: 4 additions & 4 deletions Guide.docc/CommonProblems.md
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,8 @@ removing the conformance is an API-breaking change.

Even if the type in another module is actually `Sendable`, it is not always
possible to modify its definition.
In this case, you can use a `@preconcurrency import` to suppress errors until
the library is updated.
In this case, you can use a `@preconcurrency import` to downgrade diagnostics
until the library is updated.

```swift
// ColorComponents defined here
Expand All @@ -485,8 +485,8 @@ func updateStyle(backgroundColor: ColorComponents) async {
With the addition of this `@preconcurrency import`,
`ColorComponents` remains non-`Sendable`.
However, the compiler's behavior will be altered.
When using the Swift 6 language mode, the error produced here will be downgraded
to a warning.
When using the Swift 6 language mode,
the error produced here will be downgraded to a warning.
The Swift 5 language mode will produce no diagnostics at all.

### Latent Isolation
Expand Down