Add span_help for E0044
This commit is contained in:
parent
14b7591ee5
commit
e13d659c12
1 changed files with 3 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue