Skip to main content

speculate

Attribute Macro speculate 

Source
#[speculate]
Expand description

Hint on a statement or for loop: its writes (to files, services, the network) may run ahead of an earlier ?, return or break, or for later loop items before an earlier item ends the loop. The programmer asserts that performing them when sequential code would not have is harmless (idempotent uploads, cache fills). Outside #[psync::graph], stable Rust rejects a custom attribute on a statement or expression (E0658): the graph macro removes it before the compiler sees it.