Skip to content

Commit f364f3e

Browse files
authored
Rollup merge of rust-lang#138644 - mu001999-contrib:add-cfg, r=nnethercote
Add `#[cfg(test)]` for Transition in dfa in `rustc_transmute` `Transition` is only used in the `Transitions::insert` in test after rust-lang#137776 Detected by rust-lang#128637
2 parents 20096ea + 8353577 commit f364f3e

File tree

1 file changed

+3
-0
lines changed
  • compiler/rustc_transmute/src/layout

1 file changed

+3
-0
lines changed

compiler/rustc_transmute/src/layout/dfa.rs

+3
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ where
5555
#[derive(Hash, Eq, PartialEq, PartialOrd, Ord, Copy, Clone)]
5656
pub(crate) struct State(u32);
5757

58+
#[cfg(test)]
5859
#[derive(Hash, Eq, PartialEq, Clone, Copy)]
5960
pub(crate) enum Transition<R>
6061
where
@@ -70,6 +71,7 @@ impl fmt::Debug for State {
7071
}
7172
}
7273

74+
#[cfg(test)]
7375
impl<R> fmt::Debug for Transition<R>
7476
where
7577
R: Ref,
@@ -166,6 +168,7 @@ impl State {
166168
}
167169
}
168170

171+
#[cfg(test)]
169172
impl<R> From<nfa::Transition<R>> for Transition<R>
170173
where
171174
R: Ref,

0 commit comments

Comments
 (0)