diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2015-08-26 12:50:31 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2015-08-26 12:50:31 +0200 |
| commit | e13d659c128be05d918fefa4270577e810bfe734 (patch) | |
| tree | 9049d0fc43c4a4ba3673b536f66a91af3898b2f5 | |
| parent | 14b7591ee578042da43f6a9968034f4998cf291c (diff) | |
Add span_help for E0044
| -rw-r--r-- | src/librustc_typeck/check/mod.rs | 3 |
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 { |
