From 8154d23e44b6ea2c8c9464c3b396c2a5a45a50bf Mon Sep 17 00:00:00 2001 From: Florian Gilcher Date: Wed, 2 Oct 2013 16:15:07 +0200 Subject: [PATCH] Clearer error message for external trait and type The old error message implied that external traits could never be implemented locally. --- src/librustc/middle/typeck/coherence.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustc/middle/typeck/coherence.rs b/src/librustc/middle/typeck/coherence.rs index 9ad8377cdd1..6adbcbf89d7 100644 --- a/src/librustc/middle/typeck/coherence.rs +++ b/src/librustc/middle/typeck/coherence.rs @@ -216,8 +216,8 @@ impl visit::Visitor<()> for PrivilegedScopeVisitor { if trait_def_id.crate != LOCAL_CRATE { let session = self.cc.crate_context.tcx.sess; session.span_err(item.span, - "cannot provide an extension implementation \ - for a trait not defined in this crate"); + "cannot provide an extension implementation \ + where both trait and type are not defined in this crate"); } }