Redundant Sendable
Sendable conformance is redundant on an actor-isolated type
- Identifier:
redundant_sendable
- Enabled by default: Yes
- Supports autocorrection: Yes
- Kind: lint
- Analyzer rule: No
- Minimum Swift compiler version: 5.0.0
- Default configuration:
Key Value severity warning global_actors []
Non Triggering Examples
struct S: Sendable {}
class C: Sendable {}
actor A {}
@MainActor struct S {}
@MyActor enum E: Sendable { case a }
@MainActor protocol P: Sendable {}
Triggering Examples
@MainActor struct ↓S: Sendable {}
actor ↓A: Sendable {}
//
// global_actors: ["MyActor"]
//
@MyActor enum ↓E: Sendable { case a }