Fix warning-denying builds on Rust 1.97 - #1863
Open
Quik2007 wants to merge 1 commit into
Open
Conversation
Quik2007
force-pushed
the
qos/compatibility-lint-allows
branch
3 times, most recently
from
August 31, 2026 16:38
d079512 to
795aff1
Compare
Member
|
I believe that the fix we've used in previous cases is to add something like Then we should remove the expects entirely. |
Quik2007
force-pushed
the
qos/compatibility-lint-allows
branch
from
September 1, 2026 06:32
795aff1 to
38e1060
Compare
Rust 1.97 fixed rust-lang/rust#129255, so the source-level lint expectations become unfulfilled under warning denial. Remove them and keep the old-compiler workaround local to the Rust 1.89 CI jobs, with an explicit removal condition.
Quik2007
force-pushed
the
qos/compatibility-lint-allows
branch
from
September 1, 2026 06:42
38e1060 to
3bcc3c6
Compare
Quik2007
marked this pull request as ready for review
September 1, 2026 19:30
Author
|
Implemented your approach |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Building Vello with Rust 1.97 and
-D warningsfails. Six functions use#[expect(single_use_lifetimes)]for a compiler false positive fixed in Rust 1.97. Because the lint no longer fires on Rust 1.97, the expectation is unfulfilled and becomes an error:This affects Rust 1.97 and newer when warnings are denied. Vello's MSRV is Rust 1.89 and its pinned stable CI toolchain is Rust 1.95, so the existing CI jobs did not expose the failure.
Approach
Remove the source-level expectations and keep the old-compiler workaround only in the MSRV CI jobs. This follows the approach suggested in review: Rust 1.89 still gets
-A single-use-lifetimes, while Rust 1.97 no longer sees an obsolete expectation.The CI allowance can be removed when Vello's MSRV reaches Rust 1.97. Downstream projects that explicitly enable
single_use_lifetimeswhile using Rust 1.89 through 1.96 may still need the same allowance.Changes
#[expect(single_use_lifetimes)]attributes fromvelloandvello_encoding.RUSTFLAGS=-A single-use-lifetimesin the native and Wasm MSRV jobs.RUST_MIN_VER.Testing
I reproduced the original failure on Rust 1.97.1, then checked the revised
velloandvello_encodingcrates with all features and the lockfile:-D warnings-D warnings-D warnings-D warningsAdditional checks:
velloandvello_encodingon Rust 1.95cargo test -p vello_encoding --lib --all-features --locked(31 passed)cargo test -p vello --lib --all-features --lockedAI usage: This PR was prepared with assistance from an AI coding tool.