fn implied_bounds_from_components<'tcx>(sub_region: ty::Region<'tcx>,
                                        sup_components: Vec<Component<'tcx>>)
                                        -> Vec<ImpliedBound<'tcx>>
{
    sup_components
        .into_iter()
        .flat_map(|component| {
            match component {
                Component::Region(r) =>
                    vec![ImpliedBound::RegionSubRegion(sub_region, r)],
                Component::Param(p) =>
                    vec![ImpliedBound::RegionSubParam(sub_region, p)],
                Component::Projection(p) =>
                    vec![ImpliedBound::RegionSubProjection(sub_region, p)],
                Component::EscapingProjection(_) =>
                    // If the projection has escaping regions, don't
                    // try to infer any implied bounds even for its
                    // free components. This is conservative, because
                    // the caller will still have to prove that those
                    // free components outlive `sub_region`. But the
                    // idea is that the WAY that the caller proves
                    // that may change in the future and we want to
                    // give ourselves room to get smarter here.
                    vec![],
                Component::UnresolvedInferenceVariable(..) =>
                    vec![],
            }
        })
        .collect()
}
/// When we have an implied bound that `T: 'a`, we can further break
/// this down to determine what relationships would have to hold for
/// `T: 'a` to hold. We get to assume that the caller has validated
/// those relationships.
When we have an implied bound that `T: 'a`, we can further break
this down to determine what relationships would have to hold for
`T: 'a` to hold. We get to assume that the caller has validated
those relationships.
When we have an implied bound that ` T : ' a ` we can further break this down to determine what relationships would have to hold for ` T : ' a ` to hold . We get to assume that the caller has validated those relationships .
fn implied_bounds_from_components<'tcx>(sub_region: ty::Region<'tcx>,
                                        sup_components: Vec<Component<'tcx>>)
                                        -> Vec<ImpliedBound<'tcx>>
{
    sup_components
        .into_iter()
        .flat_map(|component| {
            match component {
                Component::Region(r) =>
                    vec![ImpliedBound::RegionSubRegion(sub_region, r)],
                Component::Param(p) =>
                    vec![ImpliedBound::RegionSubParam(sub_region, p)],
                Component::Projection(p) =>
                    vec![ImpliedBound::RegionSubProjection(sub_region, p)],
                Component::EscapingProjection(_) =>
                    // If the projection has escaping regions, don't
                    // try to infer any implied bounds even for its
                    // free components. This is conservative, because
                    // the caller will still have to prove that those
                    // free components outlive `sub_region`. But the
                    // idea is that the WAY that the caller proves
                    // that may change in the future and we want to
                    // give ourselves room to get smarter here.
                    vec![],
                Component::UnresolvedInferenceVariable(..) =>
                    vec![],
            }
        })
        .collect()
}
fn implied_bounds_from_components < ' tcx > ( sub_region : ty :: Region < ' tcx > , sup_components : Vec < Component < ' tcx > > ) -> Vec < ImpliedBound < ' tcx > > { sup_components . into_iter ( ) . flat_map ( | component | { match component { Component :: Region ( r ) => vec ! [ ImpliedBound RegionSubRegion ( sub_region r ) ] , Component :: Param ( p ) => vec ! [ ImpliedBound RegionSubParam ( sub_region p ) ] , Component :: Projection ( p ) => vec ! [ ImpliedBound RegionSubProjection ( sub_region p ) ] , Component :: EscapingProjection ( _ ) => // If the projection has escaping regions, don't // try to infer any implied bounds even for its // free components. This is conservative, because // the caller will still have to prove that those // free components outlive `sub_region`. But the // idea is that the WAY that the caller proves // that may change in the future and we want to // give ourselves room to get smarter here. vec ! [ ] , Component :: UnresolvedInferenceVariable ( .. ) => vec ! [ ] , } } ) . collect ( ) }
When we have an implied bound that `T: 'a`, we can further break
this down to determine what relationships would have to hold for
`T: 'a` to hold.
When we have an implied bound that ` T : ' a ` we can further break this down to determine what relationships would have to hold for ` T : ' a ` to hold .
sub_region
ty::Region<'tcx>
sup_components
Vec<Component<'tcx>>
sub_region
ty::Region<'tcx>
sup_components
Vec<Component<'tcx>>