}
pub fn get_predicates<'tcx>(tcx: &ty::ctxt<'tcx>, def: ast::DefId)
- -> ty::GenericPredicates<'tcx>
+ -> ty::GenericPredicates<'tcx>
{
let cstore = &tcx.sess.cstore;
let cdata = cstore.get_crate_data(def.krate);
}
pub fn get_predicates<'tcx>(cdata: Cmd,
- item_id: ast::NodeId,
- tcx: &ty::ctxt<'tcx>)
- -> ty::GenericPredicates<'tcx>
+ item_id: ast::NodeId,
+ tcx: &ty::ctxt<'tcx>)
+ -> ty::GenericPredicates<'tcx>
{
let item_doc = lookup_item(item_id, cdata.data());
doc_predicates(item_doc, tcx, cdata, tag_item_generics)
So as you can see, in general translating types requires knowing the
trait hierarchy. But this gets a bit tricky because translating the
-trait hierarchy requires convering the types that appear in trait
+trait hierarchy requires converting the types that appear in trait
references. One potential saving grace is that in general knowing the
trait hierarchy is only necessary for shorthands like `T::X` or
handling omitted lifetime bounds on object types. Therefore, if we are
&ty::liberate_late_bound_regions(
tcx, body_scope, &ty::Binder(base_type)));
- //debug!("required_type={} required_type_free={} \
- //base_type={} base_type_free={}",
- //required_type.repr(tcx),
- //required_type_free.repr(tcx),
- //base_type.repr(tcx),
- //base_type_free.repr(tcx));
+ debug!("required_type={} required_type_free={} \
+ base_type={} base_type_free={}",
+ required_type.repr(tcx),
+ required_type_free.repr(tcx),
+ base_type.repr(tcx),
+ base_type_free.repr(tcx));
let infcx = infer::new_infer_ctxt(tcx);
drop(::require_same_types(tcx,