Add warn(unreachable_pub)
to rustc_privacy
.
This commit is contained in:
parent
653ee7bc3a
commit
71bffef4f9
2 changed files with 11 additions and 10 deletions
|
@ -6,6 +6,7 @@
|
|||
#![feature(let_chains)]
|
||||
#![feature(rustdoc_internals)]
|
||||
#![feature(try_blocks)]
|
||||
#![warn(unreachable_pub)]
|
||||
// tidy-alphabetical-end
|
||||
|
||||
mod errors;
|
||||
|
@ -1497,7 +1498,7 @@ impl<'tcx> PrivateItemsInPublicInterfacesChecker<'tcx, '_> {
|
|||
self.effective_visibilities.effective_vis(def_id).copied()
|
||||
}
|
||||
|
||||
pub fn check_item(&mut self, id: ItemId) {
|
||||
fn check_item(&mut self, id: ItemId) {
|
||||
let tcx = self.tcx;
|
||||
let def_id = id.owner_id.def_id;
|
||||
let item_visibility = tcx.local_visibility(def_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue