Cleaned comments and extras s.
This commit is contained in:
parent
0b36b20651
commit
736ba433ac
3 changed files with 2 additions and 40 deletions
|
|
@ -575,44 +575,6 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
|
|||
= self.on_unimplemented_note(trait_ref, obligation);
|
||||
let have_alt_message = message.is_some() || label.is_some();
|
||||
|
||||
// {
|
||||
// let ty::Binder(trait_ref) = trait_ref;
|
||||
// println!("TraitRef: {:?}", trait_ref);
|
||||
// println!("TraitRef: id:{:?}; subst:{:?}", trait_ref.def_id, trait_ref.substs);
|
||||
|
||||
// if let ty::Predicate::Trait(trait_predicate_binder) =
|
||||
// trait_ref.to_predicate() {
|
||||
// let trait_predicate = trait_predicate_binder.skip_binder();
|
||||
// println!("TraitPredicateBinder: {:?}", trait_predicate_binder);
|
||||
// println!("TraitPredicate: {:?}", trait_predicate);
|
||||
|
||||
// let trait_ty = trait_ref.self_ty();
|
||||
// println!("TraitPredicateTy: {:?}", trait_ty);
|
||||
// println!("TraitPredicateTy: sty:{:?}; flags{:?}", trait_ty.sty, trait_ty.flags);
|
||||
// }
|
||||
|
||||
// for in_ty in trait_ref.input_types() {
|
||||
// println!("\t- {:?}", in_ty);
|
||||
// println!("\t\t- sty:{:?}; flags:{:?}", in_ty.sty, in_ty.flags);
|
||||
// }
|
||||
|
||||
// println!("Message: {:?}", message);
|
||||
// println!("Label: {:?}", label);
|
||||
// println!("Obligation: {:?}", obligation);
|
||||
// println!("Span: {:?}", self.tcx.sess.codemap().span_to_string(span));
|
||||
|
||||
// let body_id = obligation.cause.body_id;
|
||||
// println!("BodyId: {:?}", body_id);
|
||||
// println!("BodyIdSpan: {:?}", self.tcx.hir.span(body_id));
|
||||
|
||||
// match self.tcx.hir.find(body_id) {
|
||||
// Some(node) => println!("Node: {:?}", node),
|
||||
// None => println!("Node not found."),
|
||||
// }
|
||||
|
||||
// println!("=------------------------------=");
|
||||
// }
|
||||
|
||||
let mut err = struct_span_err!(
|
||||
self.tcx.sess,
|
||||
span,
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ crate fn normalize_projection_ty<'tcx>(
|
|||
) = infcx.instantiate_canonical_with_fresh_inference_vars(DUMMY_SP, &goal);
|
||||
let fulfill_cx = &mut FulfillmentContext::new();
|
||||
let selcx = &mut SelectionContext::new(infcx);
|
||||
let cause = ObligationCause::misc(DUMMY_SP, DUMMY_NODE_ID, DUMMY_NODE_ID);
|
||||
let cause = ObligationCause::misc(DUMMY_SP, DUMMY_NODE_ID);
|
||||
let Normalized {
|
||||
value: answer,
|
||||
obligations,
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ pub fn check_safety_of_destructor_if_necessary<'a, 'gcx, 'tcx>(
|
|||
};
|
||||
let parent_scope = rcx.tcx.mk_region(ty::ReScope(parent_scope));
|
||||
let origin = || infer::SubregionOrigin::SafeDestructor(span);
|
||||
let cause = &ObligationCause::misc(span, body_id, body_id);
|
||||
let cause = &ObligationCause::misc(span, body_id);
|
||||
let infer_ok = rcx.infcx.at(cause, rcx.fcx.param_env).dropck_outlives(ty);
|
||||
debug!("dropck_outlives = {:#?}", infer_ok);
|
||||
let kinds = rcx.fcx.register_infer_ok_obligations(infer_ok);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue