Reduce visibilities, and add warn(unreachable_pub)
.
Lots of unnecessary `pub`s in this crate. Most are downgraded to `pub(super)`, though some don't need any visibility.
This commit is contained in:
parent
adf8d168af
commit
6af470e360
65 changed files with 125 additions and 120 deletions
|
@ -11,6 +11,7 @@
|
|||
#![feature(round_char_boundary)]
|
||||
#![feature(try_blocks)]
|
||||
#![feature(yeet_expr)]
|
||||
#![warn(unreachable_pub)]
|
||||
// tidy-alphabetical-end
|
||||
|
||||
use hir::ConstContext;
|
||||
|
@ -72,6 +73,8 @@ mod errors;
|
|||
mod ffi_unwind_calls;
|
||||
mod function_item_references;
|
||||
mod gvn;
|
||||
// Made public so that `mir_drops_elaborated_and_const_checked` can be overridden
|
||||
// by custom rustc drivers, running all the steps by themselves. See #114628.
|
||||
pub mod inline;
|
||||
mod instsimplify;
|
||||
mod jump_threading;
|
||||
|
@ -459,8 +462,8 @@ fn mir_drops_elaborated_and_const_checked(tcx: TyCtxt<'_>, def: LocalDefId) -> &
|
|||
tcx.alloc_steal_mir(body)
|
||||
}
|
||||
|
||||
// Made public such that `mir_drops_elaborated_and_const_checked` can be overridden
|
||||
// by custom rustc drivers, running all the steps by themselves.
|
||||
// Made public so that `mir_drops_elaborated_and_const_checked` can be overridden
|
||||
// by custom rustc drivers, running all the steps by themselves. See #114628.
|
||||
pub fn run_analysis_to_runtime_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
||||
assert!(body.phase == MirPhase::Analysis(AnalysisPhase::Initial));
|
||||
let did = body.source.def_id();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue