Skip to content

Commit 8a8dd3f

Browse files
committed
Add warn(unreachable_pub) to rustc_mir_dataflow.
1 parent c16e289 commit 8a8dd3f

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

compiler/rustc_mir_dataflow/src/framework/engine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use crate::errors::{
2424
};
2525
use crate::framework::BitSetExt;
2626

27-
pub type EntrySets<'tcx, A> = IndexVec<BasicBlock, <A as AnalysisDomain<'tcx>>::Domain>;
27+
type EntrySets<'tcx, A> = IndexVec<BasicBlock, <A as AnalysisDomain<'tcx>>::Domain>;
2828

2929
/// A dataflow analysis that has converged to fixpoint.
3030
#[derive(Clone)]

compiler/rustc_mir_dataflow/src/framework/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ impl<T: Idx> GenKill<T> for lattice::Dual<BitSet<T>> {
510510

511511
// NOTE: DO NOT CHANGE VARIANT ORDER. The derived `Ord` impls rely on the current order.
512512
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)]
513-
pub enum Effect {
513+
enum Effect {
514514
/// The "before" effect (e.g., `apply_before_statement_effect`) for a statement (or
515515
/// terminator).
516516
Before,
@@ -520,7 +520,7 @@ pub enum Effect {
520520
}
521521

522522
impl Effect {
523-
pub const fn at_index(self, statement_index: usize) -> EffectIndex {
523+
const fn at_index(self, statement_index: usize) -> EffectIndex {
524524
EffectIndex { effect: self, statement_index }
525525
}
526526
}

compiler/rustc_mir_dataflow/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#![feature(exact_size_is_empty)]
66
#![feature(let_chains)]
77
#![feature(try_blocks)]
8+
#![warn(unreachable_pub)]
89
// tidy-alphabetical-end
910

1011
use rustc_middle::ty;

compiler/rustc_mir_dataflow/src/move_paths/abs_domain.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ use rustc_middle::mir::{Local, Operand, PlaceElem, ProjectionElem};
1515
use rustc_middle::ty::Ty;
1616

1717
#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)]
18-
pub struct AbstractOperand;
18+
pub(crate) struct AbstractOperand;
1919
#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)]
20-
pub struct AbstractType;
21-
pub type AbstractElem = ProjectionElem<AbstractOperand, AbstractType>;
20+
pub(crate) struct AbstractType;
21+
pub(crate) type AbstractElem = ProjectionElem<AbstractOperand, AbstractType>;
2222

23-
pub trait Lift {
23+
pub(crate) trait Lift {
2424
type Abstract;
2525
fn lift(&self) -> Self::Abstract;
2626
}

0 commit comments

Comments
 (0)