about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc_typeck/check/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs
index cf08490d720..a7335f8fa84 100644
--- a/src/librustc_typeck/check/mod.rs
+++ b/src/librustc_typeck/check/mod.rs
@@ -729,6 +729,9 @@ pub fn check_item_type<'a,'tcx>(ccx: &CrateCtxt<'a,'tcx>, it: &'tcx ast::Item) {
                 if !pty.generics.types.is_empty() {
                     span_err!(ccx.tcx.sess, item.span, E0044,
                         "foreign items may not have type parameters");
+                    span_help!(ccx.tcx.sess, item.span,
+                        "consider using specialization instead of \
+                        type parameter");
                 }
 
                 if let ast::ForeignItemFn(ref fn_decl, _) = item.node {