Skip to content

svd2rust does not handle aliased enumeratedValues #194

@jscarrott

Description

@jscarrott

When using svd2rust on the nRF52840.svd file the generated code contains an unreachable pattern and won't build without adding allow(unreachable_patterns) to the library.

error: unreachable pattern --> /home/jscarrott/Git/nrf52840/src/lib.rs:29983:21 | 29983 | 216 => TXPOWERR::NEG40DBM, | ^^^ | note: lint level defined here --> /home/jscarrott/Git/nrf52840/src/lib.rs:1:487
I've ended up just adding the allow for now and using it anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bad svd robustnessthis issue is caused by not handling svds that are not fully to specification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions