Skip to content

Commit

Permalink
Adjust error message not to mention the self type
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Jan 31, 2015
1 parent ecaa687 commit 2c2879b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/librustc_typeck/coherence/orphan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,12 @@ impl<'cx, 'tcx,'v> visit::Visitor<'v> for OrphanChecker<'cx, 'tcx> {
Ok(()) => { }
Err(traits::OrphanCheckErr::NoLocalInputType) => {
if !ty::has_attr(self.tcx, trait_def_id, "old_orphan_check") {
let self_ty = ty::lookup_item_type(self.tcx, def_id).ty;
span_err!(
self.tcx.sess, item.span, E0117,
"the type `{}` does not reference any \
"the impl does not reference any \
types defined in this crate; \
only traits defined in the current crate can be \
implemented for arbitrary types",
self_ty.user_string(self.tcx));
implemented for arbitrary types");
}
}
Err(traits::OrphanCheckErr::UncoveredTy(param_ty)) => {
Expand Down

0 comments on commit 2c2879b

Please sign in to comment.