Skip to content

Commit

Permalink
Cleaned comments and extras s.
Browse files Browse the repository at this point in the history
  • Loading branch information
ysiraichi committed Mar 18, 2018
1 parent 0b36b20 commit 736ba43
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 40 deletions.
38 changes: 0 additions & 38 deletions src/librustc/traits/error_reporting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_traits/normalize_projection_ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/dropck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 736ba43

Please sign in to comment.