Function rustc_infer::infer::error_reporting::nice_region_error::find_anon_type::find_anon_type[−][src]

pub(crate) fn find_anon_type<'tcx>(
    tcx: TyCtxt<'tcx>,
    region: Region<'tcx>,
    br: &BoundRegionKind
) -> Option<(&'tcx Ty<'tcx>, &'tcx FnDecl<'tcx>)>

This function calls the visit_ty method for the parameters corresponding to the anonymous regions. The nested_visitor.found_type contains the anonymous type.

Arguments

region - the anonymous region corresponding to the anon_anon conflict br - the bound region corresponding to the above region which is of type BrAnon(_)

Example

fn foo(x: &mut Vec<&u8>, y: &u8)
   { x.push(y); }

The function returns the nested type corresponding to the anonymous region for e.g., &u8 and Vec<&u8>.