pub fn non_zero_field_path<I>(infcx: &InferCtxt<'a, 'gcx, 'tcx>,
                                  fields: I)
                                  -> Result<Option<FieldPath>, LayoutError<'gcx>>
    where I: Iterator<Item=Ty<'gcx>> {
        for (i, ty) in fields.enumerate() {
            if let Some(mut path) = Struct::non_zero_field_in_type(infcx, ty)? {
                path.push(i as u32);
                return Ok(Some(path));
            }
        }
        Ok(None)
    }
/// Find the path leading to a non-zero leaf field, starting from
/// the given set of fields and recursing through aggregates.
Find the path leading to a non-zero leaf field, starting from
the given set of fields and recursing through aggregates.
Find the path leading to a non - zero leaf field starting from the given set of fields and recursing through aggregates .
pub fn non_zero_field_path<I>(infcx: &InferCtxt<'a, 'gcx, 'tcx>,
                                  fields: I)
                                  -> Result<Option<FieldPath>, LayoutError<'gcx>>
    where I: Iterator<Item=Ty<'gcx>> {
        for (i, ty) in fields.enumerate() {
            if let Some(mut path) = Struct::non_zero_field_in_type(infcx, ty)? {
                path.push(i as u32);
                return Ok(Some(path));
            }
        }
        Ok(None)
    }
pub fn non_zero_field_path < I > ( infcx : & InferCtxt < ' a , ' gcx , ' tcx > , fields : I ) -> Result < Option < FieldPath > , LayoutError < ' gcx > > where I : Iterator < Item = Ty < ' gcx > > { for ( i , ty ) in fields . enumerate ( ) { if let Some ( mut path ) = Struct :: non_zero_field_in_type ( infcx , ty ) ? { path . push ( i as u32 ) ; return Ok ( Some ( path ) ) ; } } Ok ( None ) }
Find the path leading to a non-zero leaf field, starting from
the given set of fields and recursing through aggregates.
Find the path leading to a non - zero leaf field starting from the given set of fields and recursing through aggregates .
infcx
&InferCtxt<'a, 'gcx, 'tcx>
fields
I
infcx
&InferCtxt<'a, 'gcx, 'tcx>
fields
I