diff options
| author | Jonas Schievink <jonas@schievink.net> | 2015-10-27 17:59:32 +0100 |
|---|---|---|
| committer | Jonas Schievink <jonas@schievink.net> | 2015-10-27 17:59:32 +0100 |
| commit | 6c094b9df901f39da59d7f3237e893671f880032 (patch) | |
| tree | 8ce09b52dd4eab720ad2aa90d34b7602b2582421 | |
| parent | eab5ad529bf1d0406b25c52cc1b5281bc54c5679 (diff) | |
| download | rust-6c094b9df901f39da59d7f3237e893671f880032.tar.gz rust-6c094b9df901f39da59d7f3237e893671f880032.zip | |
Don't print the same impl twice on ext. overlap
| -rw-r--r-- | src/librustc_typeck/coherence/overlap.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/librustc_typeck/coherence/overlap.rs b/src/librustc_typeck/coherence/overlap.rs index 706f28f9fe4..54dfd01c92b 100644 --- a/src/librustc_typeck/coherence/overlap.rs +++ b/src/librustc_typeck/coherence/overlap.rs @@ -147,10 +147,10 @@ impl<'cx, 'tcx> OverlapChecker<'cx, 'tcx> { "conflicting implementations for trait `{}`", self.tcx.item_path_str(trait_def_id)); - self.report_overlap_note(impl1, impl2); + self.report_overlap_note(impl2); } - fn report_overlap_note(&self, impl1: DefId, impl2: DefId) { + fn report_overlap_note(&self, impl2: DefId) { if impl2.is_local() { span_note!(self.tcx.sess, self.span_of_impl(impl2), @@ -158,9 +158,7 @@ impl<'cx, 'tcx> OverlapChecker<'cx, 'tcx> { } else { let crate_store = &self.tcx.sess.cstore; let cdata = crate_store.get_crate_data(impl2.krate); - span_note!(self.tcx.sess, self.span_of_impl(impl1), - "conflicting implementation in crate `{}`", - cdata.name); + self.tcx.sess.note(&format!("conflicting implementation in crate `{}`", cdata.name)); } } |
