Skip to content

Bug: target-pointer-width should accept int #2653

@Darksonn

Description

@Darksonn

Description of the issue

Description:

Custom target specs fail to compile because recent rustc wants target-pointer-width to be an int, but nextest expects it to be a string.

Steps to reproduce:

  1. Use cargo nextest with rustc nightly-2025-10-12 or similar recent version
  2. Provide custom target file that specifies target-pointer-width

Expected outcome

Target generated by

rustc +nightly -Z unstable-options --print target-spec-json --target i686-unknown-linux-gnu

should work.

Actual result

Run cargo nextest run -Zbuild-std --target target-specs/i686-unknown-linux-gnu.json -p tokio --features $TOKIO_STABLE_FEATURES,taskdump
  error: error deserializing custom target JSON for `i686-unknown-linux-gnu`
    ╭─[47:28]
 46 │   ],
 47 │   "target-pointer-width": 32
    ·                            ▲
    ·                            ╰── invalid type: integer `32`, expected a string
 48 │ }
    ╰────

Nextest version

cargo-nextest 0.9.105 (716b1fba8 2025-10-02)
release: 0.9.105
commit-hash: 716b1fba8d04c7e66d8bca1db8eed09c862b1805
commit-date: 2025-10-02
host: x86_64-unknown-linux-gnu

Additional context

See:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions