Use CARGO_BUILD_WARNINGS instead of RUSTFLAGS/RUSTDOCFLAGS in CI#822
Conversation
Rust 1.97.0 adds CARGO_BUILD_WARNINGS, a Cargo-level setting that denies build and doc warnings without relying on RUSTFLAGS/RUSTDOCFLAGS. Switch the check, extra, and release-build jobs to it, replacing the separate RUSTFLAGS and RUSTDOCFLAGS entries. Also set CARGO_BUILD_WARNINGS: deny on the windows job, which previously had no warnings-as-errors setting at all. See: https://blog.rust-lang.org/2026/07/09/Rust-1.97.0/
📝 WalkthroughWalkthroughThe CI workflow file was updated to replace ChangesCI Workflow Warning Configuration
Estimated code review effort: 1 (Trivial) | ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yml:
- Line 17: The CI workflow currently switches from RUSTFLAGS: -D warnings to
CARGO_BUILD_WARNINGS: deny, which does not enforce the same warning scope.
Update the affected job(s) in the workflow to preserve full warning-as-error
behavior by keeping RUSTFLAGS with -D warnings or adding an explicit -D warnings
setting alongside CARGO_BUILD_WARNINGS, so the existing Rust build and clippy
enforcement remains intact.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 1706e539-22fe-46c3-8571-082603215bf6
📒 Files selected for processing (1)
.github/workflows/ci.yml
Rust 1.97.0 adds CARGO_BUILD_WARNINGS, a Cargo-level setting that denies build and doc warnings without relying on
RUSTFLAGS/RUSTDOCFLAGS. Switch the check, extra, and release-build jobs to it, replacing the separate RUSTFLAGS and RUSTDOCFLAGS entries.
Also set CARGO_BUILD_WARNINGS: deny on the windows job, which previously had no warnings-as-errors setting at all.
See: https://blog.rust-lang.org/2026/07/09/Rust-1.97.0/
Summary by CodeRabbit