Clearer error message for external trait and type

The old error message implied that external traits could never
be implemented locally.
This commit is contained in:
Florian Gilcher 2013-10-02 16:15:07 +02:00
parent c5c980ac2a
commit 8154d23e44

View File

@ -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");
}
}