pub fn construct_free_substs(self, def_id: DefId,
                                 free_id_outlive: CodeExtent)
                                 -> &'gcx Substs<'gcx> {

        let substs = Substs::for_item(self.global_tcx(), def_id, |def, _| {
            // map bound 'a => free 'a
            self.global_tcx().mk_region(ReFree(FreeRegion {
                scope: free_id_outlive,
                bound_region: def.to_bound_region()
            }))
        }, |def, _| {
            // map T => T
            self.global_tcx().mk_param_from_def(def)
        });

        debug!("construct_parameter_environment: {:?}", substs);
        substs
    }
/// Constructs and returns a substitution that can be applied to move from
/// the "outer" view of a type or method to the "inner" view.
/// In general, this means converting from bound parameters to
/// free parameters. Since we currently represent bound/free type
/// parameters in the same way, this only has an effect on regions.
Constructs and returns a substitution that can be applied to move from
the "outer" view of a type or method to the "inner" view.
In general, this means converting from bound parameters to
free parameters. Since we currently represent bound/free type
parameters in the same way, this only has an effect on regions.
Constructs and returns a substitution that can be applied to move from the " outer " view of a type or method to the " inner " view . In general this means converting from bound parameters to free parameters . Since we currently represent bound / free type parameters in the same way this only has an effect on regions .
pub fn construct_free_substs(self, def_id: DefId,
                                 free_id_outlive: CodeExtent)
                                 -> &'gcx Substs<'gcx> {
        let substs = Substs::for_item(self.global_tcx(), def_id, |def, _| {
            // map bound 'a => free 'a
            self.global_tcx().mk_region(ReFree(FreeRegion {
                scope: free_id_outlive,
                bound_region: def.to_bound_region()
            }))
        }, |def, _| {
            // map T => T
            self.global_tcx().mk_param_from_def(def)
        });
        debug!("construct_parameter_environment: {:?}", substs);
        substs
    }
pub fn construct_free_substs ( self , def_id : DefId , free_id_outlive : CodeExtent ) -> & ' gcx Substs < ' gcx > { let substs = Substs :: for_item ( self . global_tcx ( ) , def_id , | def , _ | { // map bound 'a => free 'a self . global_tcx ( ) . mk_region ( ReFree ( FreeRegion { scope : free_id_outlive , bound_region : def . to_bound_region ( ) } ) ) } , | def , _ | { // map T => T self . global_tcx ( ) . mk_param_from_def ( def ) } ) ; debug ! ( " " substs ) ; substs }
Constructs and returns a substitution that can be applied to move from
the "outer" view of a type or method to the "inner" view.
Constructs and returns a substitution that can be applied to move from the " outer " view of a type or method to the " inner " view .
self
def_id
DefId
free_id_outlive
CodeExtent