Skip to main content

shared_view_escape_region_violation

Function shared_view_escape_region_violation 

Source
fn shared_view_escape_region_violation(
    tcx: TyCtxt<'_>,
    caller: DefId,
    destination: Option<Local>,
    local: usize,
) -> Option<String>
Expand description

A shared view re-borrowed from the reference parameter local and returned must not claim a region that outlives the parameter’s own region. Returns a violation reason when local’s region does not outlive the return region.