From a3f05f6acec1de07d507f2e26af57522c2335ed7 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Tue, 8 Sep 2015 23:57:24 +0530 Subject: [PATCH] Fix fixme, add crate check --- src/librustc/middle/infer/error_reporting.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustc/middle/infer/error_reporting.rs b/src/librustc/middle/infer/error_reporting.rs index 8f929d9b19c2..363af87b70ba 100644 --- a/src/librustc/middle/infer/error_reporting.rs +++ b/src/librustc/middle/infer/error_reporting.rs @@ -501,7 +501,7 @@ impl<'a, 'tcx> ErrorReporting<'tcx> for InferCtxt<'a, 'tcx> { let report_path_match = |did1: DefId, did2: DefId| { // Only external crates, if either is from a local // module we could have false positives - if !(did1.is_local() || did2.is_local()) { + if !(did1.is_local() || did2.is_local()) && did1.krate != did2.krate { let exp_path = self.tcx.with_path(did1, |p| p.map(|x| x.to_string()) .collect::>()); @@ -535,7 +535,7 @@ impl<'a, 'tcx> ErrorReporting<'tcx> for InferCtxt<'a, 'tcx> { self.tcx.sess.note("errrr0"); report_path_match(exp_found.expected, exp_found.found); }, - _ => () // FIXME(Manishearth) handle traits and stuff + _ => () // FIXME(#22750) handle traits and stuff } }