pub fn new_infer_ctxt<'a, 'tcx>(tcx: &'a ty::ctxt<'tcx>,
                                tables: &'a RefCell<ty::Tables<'tcx>>,
                                param_env: Option<ty::ParameterEnvironment<'a, 'tcx>>,
                                errors_will_be_reported: bool)
                                -> InferCtxt<'a, 'tcx> {
    InferCtxt {
        tcx: tcx,
        tables: tables,
        type_variables: RefCell::new(type_variable::TypeVariableTable::new()),
        int_unification_table: RefCell::new(UnificationTable::new()),
        float_unification_table: RefCell::new(UnificationTable::new()),
        region_vars: RegionVarBindings::new(tcx),
        parameter_environment: param_env.unwrap_or(tcx.empty_parameter_environment()),
        fulfillment_cx: RefCell::new(traits::FulfillmentContext::new(errors_will_be_reported)),
        normalize: false,
        err_count_on_creation: tcx.sess.err_count()
    }
}
/// errors_will_be_reported is required to proxy to the fulfillment context
/// FIXME -- a better option would be to hold back on modifying
/// the global cache until we know that all dependent obligations
/// are also satisfied. In that case, we could actually remove
/// this boolean flag, and we'd also avoid the problem of squelching
/// duplicate errors that occur across fns.
errors_will_be_reported is required to proxy to the fulfillment context
FIXME -- a better option would be to hold back on modifying
the global cache until we know that all dependent obligations
are also satisfied. In that case, we could actually remove
this boolean flag, and we'd also avoid the problem of squelching
duplicate errors that occur across fns.
errors_will_be_reported is required to proxy to the fulfillment context FIXME -- a better option would be to hold back on modifying the global cache until we know that all dependent obligations are also satisfied . In that case we could actually remove this boolean flag and we ' d also avoid the problem of squelching duplicate errors that occur across fns .
pub fn new_infer_ctxt<'a, 'tcx>(tcx: &'a ty::ctxt<'tcx>,
                                tables: &'a RefCell<ty::Tables<'tcx>>,
                                param_env: Option<ty::ParameterEnvironment<'a, 'tcx>>,
                                errors_will_be_reported: bool)
                                -> InferCtxt<'a, 'tcx> {
    InferCtxt {
        tcx: tcx,
        tables: tables,
        type_variables: RefCell::new(type_variable::TypeVariableTable::new()),
        int_unification_table: RefCell::new(UnificationTable::new()),
        float_unification_table: RefCell::new(UnificationTable::new()),
        region_vars: RegionVarBindings::new(tcx),
        parameter_environment: param_env.unwrap_or(tcx.empty_parameter_environment()),
        fulfillment_cx: RefCell::new(traits::FulfillmentContext::new(errors_will_be_reported)),
        normalize: false,
        err_count_on_creation: tcx.sess.err_count()
    }
}
pub fn new_infer_ctxt < ' a , ' tcx > ( tcx : & ' a ty :: ctxt < ' tcx > , tables : & ' a RefCell < ty :: Tables < ' tcx > > , param_env : Option < ty :: ParameterEnvironment < ' a , ' tcx > > , errors_will_be_reported : bool ) -> InferCtxt < ' a , ' tcx > { InferCtxt { tcx : tcx , tables : tables , type_variables : RefCell :: new ( type_variable :: TypeVariableTable :: new ( ) ) , int_unification_table : RefCell :: new ( UnificationTable :: new ( ) ) , float_unification_table : RefCell :: new ( UnificationTable :: new ( ) ) , region_vars : RegionVarBindings :: new ( tcx ) , parameter_environment : param_env . unwrap_or ( tcx . empty_parameter_environment ( ) ) , fulfillment_cx : RefCell :: new ( traits :: FulfillmentContext :: new ( errors_will_be_reported ) ) , normalize : false , err_count_on_creation : tcx . sess . err_count ( ) } }
errors_will_be_reported is required to proxy to the fulfillment context
FIXME -- a better option would be to hold back on modifying
the global cache until we know that all dependent obligations
are also satisfied.
errors_will_be_reported is required to proxy to the fulfillment context FIXME -- a better option would be to hold back on modifying the global cache until we know that all dependent obligations are also satisfied .
tcx
&'a ty::ctxt<'tcx>
tables
&'a RefCell<ty::Tables<'tcx>>
param_env
Option<ty::ParameterEnvironment<'a, 'tcx>>
errors_will_be_reported
bool
tcx
&'a ty::ctxt<'tcx>
tables
&'a RefCell<ty::Tables<'tcx>>
param_env
Option<ty::ParameterEnvironment<'a, 'tcx>>
errors_will_be_reported
bool