Auto merge of #28009 - GuillaumeGomez:patch-1, r=Manishearth
r? @Manishearth
This commit is contained in:
commit
f9f82f8dc8
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 parameters");
|
||||
}
|
||||
|
||||
if let ast::ForeignItemFn(ref fn_decl, _) = item.node {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue