Skip to content

Commit 24f3595

Browse files
committed
Remove unnecessary is_local() check
1 parent a05bfc6 commit 24f3595

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/librustc_privacy/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1536,14 +1536,13 @@ impl<'a, 'tcx: 'a> SearchInterfaceForPrivateItemsVisitor<'a, 'tcx> {
15361536
/// An item is 'leaked' from a private dependency if all
15371537
/// of the following are true:
15381538
/// 1. It's contained within a public type
1539-
/// 2. It does not come from a crate marked as public
1539+
/// 2. It comes from a private crate
15401540
fn leaks_private_dep(&self, item_id: DefId) -> bool {
15411541
// Don't do any leak checking if no private crates were specified
15421542
if self.private_crates.is_empty() {
15431543
return false
15441544
}
15451545
let ret = self.required_visibility == ty::Visibility::Public &&
1546-
!item_id.is_local() &&
15471546
self.private_crates.contains(&item_id.krate);
15481547

15491548

0 commit comments

Comments
 (0)