Add warn(unreachable_pub) to rustc_passes.

This commit is contained in:
Nicholas Nethercote
2024-08-29 15:17:14 +10:00
parent 76bd802403
commit f77821203f
10 changed files with 197 additions and 192 deletions

View File

@@ -15,7 +15,11 @@ use crate::errors::{
/// Checks the crate for usage of weak lang items, returning a vector of all the
/// lang items required by this crate, but not defined yet.
pub fn check_crate(tcx: TyCtxt<'_>, items: &mut lang_items::LanguageItems, krate: &ast::Crate) {
pub(crate) fn check_crate(
tcx: TyCtxt<'_>,
items: &mut lang_items::LanguageItems,
krate: &ast::Crate,
) {
// These are never called by user code, they're generated by the compiler.
// They will never implicitly be added to the `missing` array unless we do
// so here.