Rollup merge of #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 #137776

Detected by #128637
This commit is contained in:
Matthias Krüger 2025-03-18 10:09:31 +01:00 committed by GitHub
commit f364f3ec71
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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<R>
where
@ -70,6 +71,7 @@ impl fmt::Debug for State {
}
}
#[cfg(test)]
impl<R> fmt::Debug for Transition<R>
where
R: Ref,
@ -166,6 +168,7 @@ impl State {
}
}
#[cfg(test)]
impl<R> From<nfa::Transition<R>> for Transition<R>
where
R: Ref,