---
title: "Explicit `Sendable` annotations on public type declarations (ExplicitSendable)"
framework: swift-compiler
role: article
role_heading: Article
path: swift-compiler/documentation/diagnostics/explicit-sendable-annotations
---

# Explicit `Sendable` annotations on public type declarations (ExplicitSendable)

Adds a warning for any public types without a Sendable annotation.

## Overview

Overview When enabled, the compiler will emit a warning if a public type has none of the following: A conformance to Sendable protocol; An unavailable conformance to Sendable protocol; ~Sendable conformance to suppress the inference. For example, given a simple public type: public struct S {     let x: Int } As it has no Sendable annotations, this diagnostic group will add the following warning: 1 | public struct S {   |               |- warning: public struct 'S' does not specify whether it is 'Sendable' or not [#ExplicitSendable]   |               |- note: consider making struct 'S' conform to the 'Sendable' protocol   |               `- note: make struct 'S' explicitly non-Sendable to suppress this warning 2 |     let x: Int 3 | }

## See Also

- [@dynamicCallable implementation requirements (DynamicCallable)](swift-compiler/documentation/diagnostics/dynamic-callable-requirements.md)
- [Add @preconcurrency import (AddPreconcurrencyImport)](swift-compiler/documentation/diagnostics/add-preconcurrency-import.md)
- [Always enabled availability domains (AlwaysAvailableDomain)](swift-compiler/documentation/diagnostics/always-available-domain.md)
- [Argument matching for trailing closures (TrailingClosureMatching)](swift-compiler/documentation/diagnostics/trailing-closure-matching.md)
- [Calling a mutating async actor-isolated method (ActorIsolatedMutatingAsync)](swift-compiler/documentation/diagnostics/actor-isolated-mutating-async.md)
- [Calling an actor-isolated method from a synchronous nonisolated context (ActorIsolatedCall)](swift-compiler/documentation/diagnostics/actor-isolated-call.md)
- [Captures in a `@Sendable` closure (SendableClosureCaptures)](swift-compiler/documentation/diagnostics/sendable-closure-captures.md)
- [Compilation caching (CompilationCaching)](swift-compiler/documentation/diagnostics/compilation-caching.md)
- [Conforming to `StringInterpolationProtocol` (StringInterpolationConformance)](swift-compiler/documentation/diagnostics/string-interpolation-conformance.md)
- [Conversion from `@isolated(any)` function type to synchronous function type (ConversionFromIsolatedAnyToSynchronous)](swift-compiler/documentation/diagnostics/conversion-from-isolated-any-to-synchronous.md)
- [Cross-isolation data race (RegionIsolationCrossIsolationDataRace)](swift-compiler/documentation/diagnostics/region-isolation-cross-isolation-data-race.md)
- [Deprecated declaration warnings (DeprecatedDeclaration)](swift-compiler/documentation/diagnostics/deprecated-declaration.md)
- [Deprecated implementation-only imports (ImplementationOnlyDeprecated)](swift-compiler/documentation/diagnostics/implementation-only-deprecated.md)
- [Dynamic exclusivity (DynamicExclusivity)](swift-compiler/documentation/diagnostics/dynamic-exclusivity.md)
- [Embedded Swift language restrictions (EmbeddedRestrictions)](swift-compiler/documentation/diagnostics/embedded-restrictions.md)
