Skip to content

Mark trybuild as used in juniper_codegen_tests on non-stable toolchains - #1414

Merged
LegNeato merged 1 commit into
graphql-rust:masterfrom
LegNeato:codegen-tests-lint
Nov 1, 2026
Merged

LegNeato merged 1 commit into
graphql-rust:masterfrom
LegNeato:codegen-tests-lint

Conversation

@LegNeato

@LegNeato LegNeato commented Nov 1, 2026

Copy link
Copy Markdown
Member

cargo clippy --workspace --all-features --tests -- -D warnings failed on beta and nightly with the unused_crate_dependencies lint. Only test_failing_compilation() uses trybuild, and the test exists only on the stable toolchain. CI runs Clippy only on stable, so CI did not catch the error.

The for_codegen_tests_only module of juniper_codegen_tests now imports trybuild on the other toolchains. The codegen tests still run on stable.

…chains

## Why

`test_failing_compilation()` exists only on the stable toolchain. On
beta and nightly, nothing in the crate used `trybuild`, so
`cargo clippy --tests` failed with the `unused_crate_dependencies`
lint.

## What changed

The `for_codegen_tests_only` module imports `trybuild` on non-stable
toolchains.

## Testing

`cargo clippy --workspace --all-features --tests -- -D warnings` passes
on stable and nightly. The codegen tests still run on stable.
@LegNeato
LegNeato merged commit 275d50b into graphql-rust:master Nov 1, 2026
184 checks passed
@LegNeato
LegNeato deleted the codegen-tests-lint branch November 1, 2026 19:21
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