diff --git a/compiler/rustc_transmute/src/layout/dfa.rs b/compiler/rustc_transmute/src/layout/dfa.rs index a29baade42fb7..af568171f911c 100644 --- a/compiler/rustc_transmute/src/layout/dfa.rs +++ b/compiler/rustc_transmute/src/layout/dfa.rs @@ -55,6 +55,7 @@ where #[derive(Hash, Eq, PartialEq, PartialOrd, Ord, Copy, Clone)] pub(crate) struct State(u32); +#[cfg(test)] #[derive(Hash, Eq, PartialEq, Clone, Copy)] pub(crate) enum Transition where @@ -70,6 +71,7 @@ impl fmt::Debug for State { } } +#[cfg(test)] impl fmt::Debug for Transition where R: Ref, @@ -166,6 +168,7 @@ impl State { } } +#[cfg(test)] impl From> for Transition where R: Ref,