@@ -1453,15 +1453,15 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for InvalidUpcastComparisons {
1453
1453
}
1454
1454
}
1455
1455
1456
- /// **What it does:** Checks for `impl` or `fn` missing generalization over
1456
+ /// **What it does:** Checks for public `impl` or `fn` missing generalization over
1457
1457
/// different hashers and implicitly defaulting to the default hashing
1458
- /// algorithm (SipHash). This lint ignores private free-functions.
1458
+ /// algorithm (SipHash).
1459
1459
///
1460
1460
/// **Why is this bad?** `HashMap` or `HashSet` with custom hashers cannot be
1461
1461
/// used with them.
1462
1462
///
1463
- /// **Known problems:** Suggestions for replacing constructors contains
1464
- /// false-positives. Also applying suggestion can require modification of other
1463
+ /// **Known problems:** Suggestions for replacing constructors can contain
1464
+ /// false-positives. Also applying suggestions can require modification of other
1465
1465
/// pieces of code, possibly including external crates.
1466
1466
///
1467
1467
/// **Example:**
@@ -1530,9 +1530,10 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ImplicitHasher {
1530
1530
if !vis. suggestions . is_empty ( ) {
1531
1531
multispan_sugg ( db, "...and use generic constructor" . into ( ) , vis. suggestions ) ;
1532
1532
}
1533
- // for (span, sugg) in vis.suggestions {
1534
- // db.span_suggestion(span, "...and use generic constructor here", sugg);
1535
- // }
1533
+ }
1534
+
1535
+ if !cx. access_levels . is_exported ( item. id ) {
1536
+ return ;
1536
1537
}
1537
1538
1538
1539
match item. node {
@@ -1565,10 +1566,6 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ImplicitHasher {
1565
1566
}
1566
1567
} ,
1567
1568
ItemFn ( ref decl, .., ref generics, body_id) => {
1568
- if item. vis != Public {
1569
- return ;
1570
- }
1571
-
1572
1569
let body = cx. tcx . hir . body ( body_id) ;
1573
1570
1574
1571
for ty in & decl. inputs {
0 commit comments