• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Qiskit / qiskit / 17154949285

22 Aug 2025 11:51AM UTC coverage: 88.416% (-0.01%) from 88.43%
17154949285

push

github

web-flow
Rename variable mapper Target enum to SwitchTarget (#14935)

* Rename variable mapper Target enum to ControlFlowTarget

For better or worse we're using cbindgen to generate the C headers and
it does basically a flat search on the entire rust code base for symbol
names when trying to extract details for types exposed across the C FFI.
This means if there are any name overlaps, regardless of whether they're
namespaced or set to private visibility will likely confuse cbindgen and
create an incorrect C header file. The latest instance of this is the
`Target` name. In the C API we export `qiskit_transpiler::target::Target`
as that is the public facing representation of the compilation target to
C, however there was also a `qiskit_circuit::variable_mapper::Target`
enum which is internally used in the circuit crate to represent the
target type of a control flow operation. cbindgen was getting these
confused and exporting the docstring from the enum and not the actual
user facing struct. This commit corrects for this shortcoming by renaming
`qiskit_circuit::variable_mapper::Target` to `ControlFlowTarget` so
there is no longer a name collision and cbindgen will pick the correct
type to use for generating the header.

* Switch from `ControlFlowTarget` to `SwitchTarget`

7 of 12 new or added lines in 1 file covered. (58.33%)

23 existing lines in 3 files now uncovered.

89817 of 101584 relevant lines covered (88.42%)

498266.81 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

64.56
/crates/circuit/src/variable_mapper.rs


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc