Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b0530c9

Browse files
committedFeb 28, 2025
Remove allow(dead_code) attributes.
By either removing the function, or change the attribute to something more precise.
1 parent 785e21d commit b0530c9

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed
 

‎compiler/rustc_transmute/src/layout/dfa.rs

+1-10
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ impl<R> Transitions<R>
3838
where
3939
R: Ref,
4040
{
41-
#[allow(dead_code)]
41+
#[cfg(test)]
4242
fn insert(&mut self, transition: Transition<R>, state: State) {
4343
match transition {
4444
Transition::Byte(b) => {
@@ -86,15 +86,6 @@ impl<R> Dfa<R>
8686
where
8787
R: Ref,
8888
{
89-
#[allow(dead_code)]
90-
pub(crate) fn unit() -> Self {
91-
let transitions: Map<State, Transitions<R>> = Map::default();
92-
let start = State::new();
93-
let accepting = start;
94-
95-
Self { transitions, start, accepting }
96-
}
97-
9889
#[cfg(test)]
9990
pub(crate) fn bool() -> Self {
10091
let mut transitions: Map<State, Transitions<R>> = Map::default();

‎compiler/rustc_transmute/src/layout/nfa.rs

-5
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,6 @@ where
159159
}
160160
Self { transitions, start, accepting }
161161
}
162-
163-
#[allow(dead_code)]
164-
pub(crate) fn edges_from(&self, start: State) -> Option<&Map<Transition<R>, Set<State>>> {
165-
self.transitions.get(&start)
166-
}
167162
}
168163

169164
impl State {

0 commit comments

Comments
 (0)
Failed to load comments.