diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-08-28 09:39:59 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-09-09 08:48:09 +1000 |
| commit | 6af470e360b775a9079bd0e6634488d7a1936290 (patch) | |
| tree | 8c3ada2805a425afa8f6a8aed6663665ce995098 /compiler/rustc_mir_transform/src/validate.rs | |
| parent | adf8d168af9334a8bf940824fcf4207d01e05ae5 (diff) | |
| download | rust-6af470e360b775a9079bd0e6634488d7a1936290.tar.gz rust-6af470e360b775a9079bd0e6634488d7a1936290.zip | |
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.
Diffstat (limited to 'compiler/rustc_mir_transform/src/validate.rs')
| -rw-r--r-- | compiler/rustc_mir_transform/src/validate.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_mir_transform/src/validate.rs b/compiler/rustc_mir_transform/src/validate.rs index e515dfc5ea5..18865c73f75 100644 --- a/compiler/rustc_mir_transform/src/validate.rs +++ b/compiler/rustc_mir_transform/src/validate.rs @@ -26,7 +26,7 @@ enum EdgeKind { Normal, } -pub struct Validator { +pub(super) struct Validator { /// Describes at which point in the pipeline this validation is happening. pub when: String, /// The phase for which we are upholding the dialect. If the given phase forbids a specific @@ -531,7 +531,7 @@ impl<'a, 'tcx> Visitor<'tcx> for CfgChecker<'a, 'tcx> { /// /// `caller_body` is used to detect cycles in MIR inlining and MIR validation before /// `optimized_mir` is available. -pub fn validate_types<'tcx>( +pub(super) fn validate_types<'tcx>( tcx: TyCtxt<'tcx>, mir_phase: MirPhase, param_env: ty::ParamEnv<'tcx>, |
