Skip to content

Commit 2c2879b

Browse files
committed
Adjust error message not to mention the self type
1 parent ecaa687 commit 2c2879b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/librustc_typeck/coherence/orphan.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,12 @@ impl<'cx, 'tcx,'v> visit::Visitor<'v> for OrphanChecker<'cx, 'tcx> {
7777
Ok(()) => { }
7878
Err(traits::OrphanCheckErr::NoLocalInputType) => {
7979
if !ty::has_attr(self.tcx, trait_def_id, "old_orphan_check") {
80-
let self_ty = ty::lookup_item_type(self.tcx, def_id).ty;
8180
span_err!(
8281
self.tcx.sess, item.span, E0117,
83-
"the type `{}` does not reference any \
82+
"the impl does not reference any \
8483
types defined in this crate; \
8584
only traits defined in the current crate can be \
86-
implemented for arbitrary types",
87-
self_ty.user_string(self.tcx));
85+
implemented for arbitrary types");
8886
}
8987
}
9088
Err(traits::OrphanCheckErr::UncoveredTy(param_ty)) => {

0 commit comments

Comments
 (0)