Skip to main content

postprocess_singletons

Function postprocess_singletons 

Source
pub fn postprocess_singletons(
    tokens: TokenStream,
    resolved_exprs: impl IntoIterator<Item = TokenStream>,
) -> Punctuated<Expr, Comma>
Expand description

Replaces singleton references #my_var with the code needed to actually get the value inside.

  • tokens - The tokens to update singleton references within.
  • resolved_exprs - Token streams that correspond 1:1 and in the same order as the singleton references within tokens (found in-order via preprocess_singletons).

Generates (*expr) — an immutable place expression that prevents consumer mutation.