diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-03-18 10:09:31 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-18 10:09:31 +0100 |
| commit | f364f3ec71dae419e0fc2916f1eee3f200ea7095 (patch) | |
| tree | 096df860c2dcdb77e6a69d662d9fe9427c56415a | |
| parent | 20096eabdb3a09afb6eeb2b77a9a82997c5a27c3 (diff) | |
| parent | 835357749b2cb4b7491868aad618829ea3cab9ca (diff) | |
| download | rust-f364f3ec71dae419e0fc2916f1eee3f200ea7095.tar.gz rust-f364f3ec71dae419e0fc2916f1eee3f200ea7095.zip | |
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
| -rw-r--r-- | compiler/rustc_transmute/src/layout/dfa.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_transmute/src/layout/dfa.rs b/compiler/rustc_transmute/src/layout/dfa.rs index a29baade42f..af568171f91 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<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, |
