Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Ignore missing features in tests crates #1101

Merged
merged 1 commit into from
Jul 12, 2024

Conversation

caspermeijn
Copy link
Collaborator

Only the crate tests-2015 uses the feature edition-2015, but the code is shared with the tests crate.

Same for tests-no-std which disables feature std, but reuses the code with the tests crate.

Therefore the tests, tests-2018 and tests-no-std crates should be configured to ignore the lint about missing features.

Cargo clippy reports:

warning: unexpected `cfg` condition value: `edition-2015`
 --> tests-no-std/../tests/src/build.rs:5:14
  |
5 |     if #[cfg(feature = "edition-2015")] {
  |              ^^^^^^^-----------------
  |              |
  |              help: remove the condition
  |
  = note: no expected values for `feature`
  = help: consider adding `edition-2015` as a feature in `Cargo.toml`
  = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
  = note: `#[warn(unexpected_cfgs)]` on by default

Only the crate `tests-2015` uses the feature `edition-2015`, but the code is shared with the `tests` crate.

Same for `tests-no-std` which disables feature `std`, but reuses the code with the `tests` crate.

Therefore the `tests`, `tests-2018` and `tests-no-std` crates should be configured to ignore the lint about missing features.

Cargo clippy reports:
```
warning: unexpected `cfg` condition value: `edition-2015`
 --> tests-no-std/../tests/src/build.rs:5:14
  |
5 |     if #[cfg(feature = "edition-2015")] {
  |              ^^^^^^^-----------------
  |              |
  |              help: remove the condition
  |
  = note: no expected values for `feature`
  = help: consider adding `edition-2015` as a feature in `Cargo.toml`
  = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
  = note: `#[warn(unexpected_cfgs)]` on by default
```
@caspermeijn caspermeijn added this pull request to the merge queue Jul 12, 2024
Merged via the queue into tokio-rs:master with commit 688da45 Jul 12, 2024
16 checks passed
@caspermeijn caspermeijn deleted the unknown_config2 branch July 12, 2024 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant