Add span_help for E0044

This commit is contained in:
Guillaume Gomez 2015-08-26 12:50:31 +02:00
parent 14b7591ee5
commit e13d659c12

View file

@ -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 {