Skip to content

Commit 736ba43

Browse files
committed
Cleaned comments and extras s.
1 parent 0b36b20 commit 736ba43

File tree

3 files changed

+2
-40
lines changed

3 files changed

+2
-40
lines changed

src/librustc/traits/error_reporting.rs

-38
Original file line numberDiff line numberDiff line change
@@ -575,44 +575,6 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
575575
= self.on_unimplemented_note(trait_ref, obligation);
576576
let have_alt_message = message.is_some() || label.is_some();
577577

578-
// {
579-
// let ty::Binder(trait_ref) = trait_ref;
580-
// println!("TraitRef: {:?}", trait_ref);
581-
// println!("TraitRef: id:{:?}; subst:{:?}", trait_ref.def_id, trait_ref.substs);
582-
583-
// if let ty::Predicate::Trait(trait_predicate_binder) =
584-
// trait_ref.to_predicate() {
585-
// let trait_predicate = trait_predicate_binder.skip_binder();
586-
// println!("TraitPredicateBinder: {:?}", trait_predicate_binder);
587-
// println!("TraitPredicate: {:?}", trait_predicate);
588-
589-
// let trait_ty = trait_ref.self_ty();
590-
// println!("TraitPredicateTy: {:?}", trait_ty);
591-
// println!("TraitPredicateTy: sty:{:?}; flags{:?}", trait_ty.sty, trait_ty.flags);
592-
// }
593-
594-
// for in_ty in trait_ref.input_types() {
595-
// println!("\t- {:?}", in_ty);
596-
// println!("\t\t- sty:{:?}; flags:{:?}", in_ty.sty, in_ty.flags);
597-
// }
598-
599-
// println!("Message: {:?}", message);
600-
// println!("Label: {:?}", label);
601-
// println!("Obligation: {:?}", obligation);
602-
// println!("Span: {:?}", self.tcx.sess.codemap().span_to_string(span));
603-
604-
// let body_id = obligation.cause.body_id;
605-
// println!("BodyId: {:?}", body_id);
606-
// println!("BodyIdSpan: {:?}", self.tcx.hir.span(body_id));
607-
608-
// match self.tcx.hir.find(body_id) {
609-
// Some(node) => println!("Node: {:?}", node),
610-
// None => println!("Node not found."),
611-
// }
612-
613-
// println!("=------------------------------=");
614-
// }
615-
616578
let mut err = struct_span_err!(
617579
self.tcx.sess,
618580
span,

src/librustc_traits/normalize_projection_ty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ crate fn normalize_projection_ty<'tcx>(
3636
) = infcx.instantiate_canonical_with_fresh_inference_vars(DUMMY_SP, &goal);
3737
let fulfill_cx = &mut FulfillmentContext::new();
3838
let selcx = &mut SelectionContext::new(infcx);
39-
let cause = ObligationCause::misc(DUMMY_SP, DUMMY_NODE_ID, DUMMY_NODE_ID);
39+
let cause = ObligationCause::misc(DUMMY_SP, DUMMY_NODE_ID);
4040
let Normalized {
4141
value: answer,
4242
obligations,

src/librustc_typeck/check/dropck.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ pub fn check_safety_of_destructor_if_necessary<'a, 'gcx, 'tcx>(
298298
};
299299
let parent_scope = rcx.tcx.mk_region(ty::ReScope(parent_scope));
300300
let origin = || infer::SubregionOrigin::SafeDestructor(span);
301-
let cause = &ObligationCause::misc(span, body_id, body_id);
301+
let cause = &ObligationCause::misc(span, body_id);
302302
let infer_ok = rcx.infcx.at(cause, rcx.fcx.param_env).dropck_outlives(ty);
303303
debug!("dropck_outlives = {:#?}", infer_ok);
304304
let kinds = rcx.fcx.register_infer_ok_obligations(infer_ok);

0 commit comments

Comments
 (0)