about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2015-01-31 04:39:16 -0500
committerNiko Matsakis <niko@alum.mit.edu>2015-01-31 04:39:16 -0500
commit2c2879bbce4177552ce26c6445dcb7027a1245c7 (patch)
tree81f9cecbe85d1bddda76fce4cf32d2afe5a806b2
parentecaa68768cdc1fa82a750998634e9cc3202975f9 (diff)
downloadrust-2c2879bbce4177552ce26c6445dcb7027a1245c7.tar.gz
rust-2c2879bbce4177552ce26c6445dcb7027a1245c7.zip
Adjust error message not to mention the self type
-rw-r--r--src/librustc_typeck/coherence/orphan.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/librustc_typeck/coherence/orphan.rs b/src/librustc_typeck/coherence/orphan.rs
index 60b1fa5f4cf..5b97175ab22 100644
--- a/src/librustc_typeck/coherence/orphan.rs
+++ b/src/librustc_typeck/coherence/orphan.rs
@@ -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)) => {