From dc45d924b6ec0ffc7fadf8763ce5fc91946e2dcd Mon Sep 17 00:00:00 2001 From: Aaron Turon Date: Sun, 13 Mar 2016 14:18:45 -0700 Subject: [PATCH] Adjust error code --- src/librustc_typeck/coherence/overlap.rs | 2 +- src/librustc_typeck/diagnostics.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/librustc_typeck/coherence/overlap.rs b/src/librustc_typeck/coherence/overlap.rs index 99dd72538c9..f7fa3e1b142 100644 --- a/src/librustc_typeck/coherence/overlap.rs +++ b/src/librustc_typeck/coherence/overlap.rs @@ -120,7 +120,7 @@ impl<'cx, 'tcx,'v> intravisit::Visitor<'v> for OverlapChecker<'cx, 'tcx> { if let Some(prev_id) = prev_default_impl { let mut err = struct_span_err!( self.tcx.sess, - self.tcx.span_of_impl(impl_def_id).unwrap(), E0519, + self.tcx.span_of_impl(impl_def_id).unwrap(), E0521, "redundant default implementations of trait `{}`:", trait_ref); err.span_note(self.tcx.span_of_impl(self.tcx.map.local_def_id(prev_id)) diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index 79508c2ca9f..19cfc13ea61 100644 --- a/src/librustc_typeck/diagnostics.rs +++ b/src/librustc_typeck/diagnostics.rs @@ -3696,6 +3696,6 @@ register_diagnostics! { // type `{}` was overridden E0436, // functional record update requires a struct E0513, // no type for local variable .. - E0519, // redundant default implementations of trait - E0520 // cannot specialize non-default item + E0520, // cannot specialize non-default item + E0521 // redundant default implementations of trait }