fn find_anon_type(&self, region: Region<'tcx>, br: &ty::BoundRegion) -> Option<&hir::Ty> {
        if let Some(anon_reg) = self.is_suitable_anonymous_region(region) {
            let (def_id, _) = anon_reg;
            if let Some(node_id) = self.tcx.hir.as_local_node_id(def_id) {
                let ret_ty = self.tcx.type_of(def_id);
                if let ty::TyFnDef(_, _) = ret_ty.sty {
                    if let hir_map::NodeItem(it) = self.tcx.hir.get(node_id) {
                        if let hir::ItemFn(ref fndecl, _, _, _, _, _) = it.node {
                            return fndecl
                                       .inputs
                                       .iter()
                                       .filter_map(|arg| {
                                let mut nested_visitor = FindNestedTypeVisitor {
                                    infcx: &self,
                                    hir_map: &self.tcx.hir,
                                    bound_region: *br,
                                    found_type: None,
                                };
                                nested_visitor.visit_ty(&**arg);
                                if nested_visitor.found_type.is_some() {
                                    nested_visitor.found_type
                                } else {
                                    None
                                }
                            })
                                       .next();
                        }
                    }
                }
            }
        }
        None
    }
/// 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`.
This function calls the `visit_ty` method for the parameters
corresponding to the anonymous regions.
This function calls the ` visit_ty ` method for the parameters corresponding to the anonymous regions .
fn find_anon_type(&self, region: Region<'tcx>, br: &ty::BoundRegion) -> Option<&hir::Ty> {
        if let Some(anon_reg) = self.is_suitable_anonymous_region(region) {
            let (def_id, _) = anon_reg;
            if let Some(node_id) = self.tcx.hir.as_local_node_id(def_id) {
                let ret_ty = self.tcx.type_of(def_id);
                if let ty::TyFnDef(_, _) = ret_ty.sty {
                    if let hir_map::NodeItem(it) = self.tcx.hir.get(node_id) {
                        if let hir::ItemFn(ref fndecl, _, _, _, _, _) = it.node {
                            return fndecl
                                       .inputs
                                       .iter()
                                       .filter_map(|arg| {
                                let mut nested_visitor = FindNestedTypeVisitor {
                                    infcx: &self,
                                    hir_map: &self.tcx.hir,
                                    bound_region: *br,
                                    found_type: None,
                                };
                                nested_visitor.visit_ty(&**arg);
                                if nested_visitor.found_type.is_some() {
                                    nested_visitor.found_type
                                } else {
                                    None
                                }
                            })
                                       .next();
                        }
                    }
                }
            }
        }
        None
    }
fn find_anon_type ( & self , region : Region < ' tcx > , br : & ty :: BoundRegion ) -> Option < & hir :: Ty > { if let Some ( anon_reg ) = self . is_suitable_anonymous_region ( region ) { let ( def_id , _ ) = anon_reg ; if let Some ( node_id ) = self . tcx . hir . as_local_node_id ( def_id ) { let ret_ty = self . tcx . type_of ( def_id ) ; if let ty :: TyFnDef ( _ , _ ) = ret_ty . sty { if let hir_map :: NodeItem ( it ) = self . tcx . hir . get ( node_id ) { if let hir :: ItemFn ( ref fndecl , _ , _ , _ , _ , _ ) = it . node { return fndecl . inputs . iter ( ) . filter_map ( | arg | { let mut nested_visitor = FindNestedTypeVisitor { infcx : & self , hir_map : & self . tcx . hir , bound_region : * br , found_type : None , } ; nested_visitor . visit_ty ( & * * arg ) ; if nested_visitor . found_type . is_some ( ) { nested_visitor . found_type } else { None } } ) . next ( ) ; } } } } } None }
This function calls the `visit_ty` method for the parameters
corresponding to the anonymous regions.
This function calls the ` visit_ty ` method for the parameters corresponding to the anonymous regions .
&self
region
Region<'tcx>
br
&ty::BoundRegion
&self
region
Region<'tcx>
br
&ty::BoundRegion
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.
` ` ` 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 .