/// Computes the guarantors for any ref bindings in a `let` and
/// then ensures that the lifetime of the resulting pointer is
/// linked to the lifetime of the initialization expression.
Computes the guarantors for any ref bindings in a `let` and
then ensures that the lifetime of the resulting pointer is
linked to the lifetime of the initialization expression.
Computes the guarantors for any ref bindings in a ` let ` and then ensures that the lifetime of the resulting pointer is linked to the lifetime of the initialization expression .
fn link_local(rcx: &Rcx, local: &hir::Local) {
    debug!("regionck::for_local()");
    let init_expr = match local.init {
        None => { return; }
        Some(ref expr) => &**expr,
    };
    let mc = mc::MemCategorizationContext::new(rcx.fcx.infcx());
    let discr_cmt = ignore_err!(mc.cat_expr(init_expr));
    link_pattern(rcx, mc, discr_cmt, &*local.pat);
}
fn link_local ( rcx : & Rcx , local : & hir :: Local ) { debug ! ( " " ) ; let init_expr = match local . init { None => { return ; } Some ( ref expr ) => & * * expr , } ; let mc = mc :: MemCategorizationContext :: new ( rcx . fcx . infcx ( ) ) ; let discr_cmt = ignore_err ! ( mc cat_expr ( init_expr ) ) ; link_pattern ( rcx , mc , discr_cmt , & * local . pat ) ; }
Computes the guarantors for any ref bindings in a `let` and
then ensures that the lifetime of the resulting pointer is
linked to the lifetime of the initialization expression.
Computes the guarantors for any ref bindings in a ` let ` and then ensures that the lifetime of the resulting pointer is linked to the lifetime of the initialization expression .
rcx
&Rcx
local
&hir::Local