Skip to main content

TASK_SAFETY_RULE

Constant TASK_SAFETY_RULE 

Source
pub const TASK_SAFETY_RULE: &str = "Immutable task-safe values such as arrays may cross task boundaries. A vector cannot cross, even through `let`; finish it as an array or wrap mutable state in `Shared` or another synchronized type. Closures are task-safe only when every capture is.";
Expand description

The Language Card sentence every task-safety diagnostic quotes.