Skip to content

Commit a3f05f6

Browse files
committed
Fix fixme, add crate check
1 parent b48ffa0 commit a3f05f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc/middle/infer/error_reporting.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ impl<'a, 'tcx> ErrorReporting<'tcx> for InferCtxt<'a, 'tcx> {
501501
let report_path_match = |did1: DefId, did2: DefId| {
502502
// Only external crates, if either is from a local
503503
// module we could have false positives
504-
if !(did1.is_local() || did2.is_local()) {
504+
if !(did1.is_local() || did2.is_local()) && did1.krate != did2.krate {
505505
let exp_path = self.tcx.with_path(did1,
506506
|p| p.map(|x| x.to_string())
507507
.collect::<Vec<_>>());
@@ -535,7 +535,7 @@ impl<'a, 'tcx> ErrorReporting<'tcx> for InferCtxt<'a, 'tcx> {
535535
self.tcx.sess.note("errrr0");
536536
report_path_match(exp_found.expected, exp_found.found);
537537
},
538-
_ => () // FIXME(Manishearth) handle traits and stuff
538+
_ => () // FIXME(#22750) handle traits and stuff
539539
}
540540
}
541541

0 commit comments

Comments
 (0)