diff --git a/compiler/rustc_mir_dataflow/src/framework/engine.rs b/compiler/rustc_mir_dataflow/src/framework/engine.rs index 364a416480fed..0bab03b027161 100644 --- a/compiler/rustc_mir_dataflow/src/framework/engine.rs +++ b/compiler/rustc_mir_dataflow/src/framework/engine.rs @@ -24,7 +24,7 @@ use crate::errors::{ }; use crate::framework::BitSetExt; -pub type EntrySets<'tcx, A> = IndexVec>::Domain>; +type EntrySets<'tcx, A> = IndexVec>::Domain>; /// A dataflow analysis that has converged to fixpoint. #[derive(Clone)] diff --git a/compiler/rustc_mir_dataflow/src/framework/mod.rs b/compiler/rustc_mir_dataflow/src/framework/mod.rs index 6eaed0f775337..6da3a20dc02c3 100644 --- a/compiler/rustc_mir_dataflow/src/framework/mod.rs +++ b/compiler/rustc_mir_dataflow/src/framework/mod.rs @@ -510,7 +510,7 @@ impl GenKill for lattice::Dual> { // NOTE: DO NOT CHANGE VARIANT ORDER. The derived `Ord` impls rely on the current order. #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)] -pub enum Effect { +enum Effect { /// The "before" effect (e.g., `apply_before_statement_effect`) for a statement (or /// terminator). Before, @@ -520,7 +520,7 @@ pub enum Effect { } impl Effect { - pub const fn at_index(self, statement_index: usize) -> EffectIndex { + const fn at_index(self, statement_index: usize) -> EffectIndex { EffectIndex { effect: self, statement_index } } } diff --git a/compiler/rustc_mir_dataflow/src/lib.rs b/compiler/rustc_mir_dataflow/src/lib.rs index 8708bebeeb087..9385b52103f69 100644 --- a/compiler/rustc_mir_dataflow/src/lib.rs +++ b/compiler/rustc_mir_dataflow/src/lib.rs @@ -5,6 +5,7 @@ #![feature(exact_size_is_empty)] #![feature(let_chains)] #![feature(try_blocks)] +#![warn(unreachable_pub)] // tidy-alphabetical-end use rustc_middle::ty; diff --git a/compiler/rustc_mir_dataflow/src/move_paths/abs_domain.rs b/compiler/rustc_mir_dataflow/src/move_paths/abs_domain.rs index 2a7f23ef6d251..df4c0593246cf 100644 --- a/compiler/rustc_mir_dataflow/src/move_paths/abs_domain.rs +++ b/compiler/rustc_mir_dataflow/src/move_paths/abs_domain.rs @@ -15,12 +15,12 @@ use rustc_middle::mir::{Local, Operand, PlaceElem, ProjectionElem}; use rustc_middle::ty::Ty; #[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)] -pub struct AbstractOperand; +pub(crate) struct AbstractOperand; #[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)] -pub struct AbstractType; -pub type AbstractElem = ProjectionElem; +pub(crate) struct AbstractType; +pub(crate) type AbstractElem = ProjectionElem; -pub trait Lift { +pub(crate) trait Lift { type Abstract; fn lift(&self) -> Self::Abstract; }