Skip to content

Suggested test setup causes cargo warnings #352

Open
@simonwuelker

Description

The suggested setup for tests using loom1 involves using a custom configuration. (#[cfg(loom)])

Unfortunately, this triggers the new rustc lint for unexpected cfg parameters 2 (only available on the latest nightly version).

What is the suggested way to deal with this? Ideally one would not need to add a build.rs file just to register a custom cfg name.

(This issue stems from faern/oneshot#34)

Footnotes

  1. https://docs.rs/loom/latest/loom/#writing-tests

  2. https://blog.rust-lang.org/2024/05/06/check-cfg.html

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions