Skip to main content

from_owned_program

Function from_owned_program 

Source
pub fn from_owned_program<'arena>(
    arena: &'arena Bump,
    program: &Program,
) -> Program<'arena, 'arena>
Expand description

Convert an owned Program into an arena-allocated Program.

All strings are copied into arena. Both lifetime parameters of the returned type are 'arena because every string originates in the arena rather than a source buffer.

Used internally by the pretty printer so callers can pass an owned program without round-tripping through parse_arena().