@@ -1335,23 +1335,23 @@ a file descriptor isn't safe to send across concurrency domains.
1335
1335
<!--
1336
1336
- test: `suppressing-implied-sendable-conformance`
1337
1337
1338
- -> struct NonsendableTemperatureReading {
1339
- -> var measurement: Int
1338
+ -> struct FileDescriptor {
1339
+ -> let rawValue: CInt
1340
1340
-> }
1341
1341
---
1342
1342
-> @available(*, unavailable)
1343
- -> extension NonsendableTemperatureReading : Sendable { }
1344
- >> let nonsendable: Sendable = NonsendableTemperatureReading(measurement : 10)
1345
- !$ warning: conformance of 'NonsendableTemperatureReading ' to 'Sendable' is unavailable; this is an error in Swift 6
1346
- !! let nonsendable: Sendable = NonsendableTemperatureReading(measurement : 10)
1343
+ -> extension FileDescriptor : Sendable { }
1344
+ >> let nonsendable: Sendable = FileDescriptor(rawValue : 10)
1345
+ !$ warning: conformance of 'FileDescriptor ' to 'Sendable' is unavailable; this is an error in Swift 6
1346
+ !! let nonsendable: Sendable = FileDescriptor(rawValue : 10)
1347
1347
!! ^
1348
- !$ note: conformance of 'NonsendableTemperatureReading ' to 'Sendable' has been explicitly marked unavailable here
1349
- !! extension NonsendableTemperatureReading : Sendable { }
1348
+ !$ note: conformance of 'FileDescriptor ' to 'Sendable' has been explicitly marked unavailable here
1349
+ !! extension FileDescriptor : Sendable { }
1350
1350
!! ^
1351
1351
-->
1352
1352
1353
1353
In the code above,
1354
- the ` NonsendableTemperatureReading ` is a structure
1354
+ the ` FileDescriptor ` is a structure
1355
1355
that meets the criteria to be implicitly sendable.
1356
1356
However, the extension makes its conformance to ` Sendable ` unavailable,
1357
1357
preventing the type from being sendable.
0 commit comments