Skip to content

Commit f9f82f8

Browse files
committed
Auto merge of #28009 - GuillaumeGomez:patch-1, r=Manishearth
r? @Manishearth
2 parents 6d6bf81 + b874660 commit f9f82f8

File tree

1 file changed

+3
-0
lines changed
  • src/librustc_typeck/check

1 file changed

+3
-0
lines changed

src/librustc_typeck/check/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,9 @@ pub fn check_item_type<'a,'tcx>(ccx: &CrateCtxt<'a,'tcx>, it: &'tcx ast::Item) {
729729
if !pty.generics.types.is_empty() {
730730
span_err!(ccx.tcx.sess, item.span, E0044,
731731
"foreign items may not have type parameters");
732+
span_help!(ccx.tcx.sess, item.span,
733+
"consider using specialization instead of \
734+
type parameters");
732735
}
733736

734737
if let ast::ForeignItemFn(ref fn_decl, _) = item.node {

0 commit comments

Comments
 (0)