Skip to content

Fix warning-denying builds on Rust 1.97 - #1863

Open
Quik2007 wants to merge 1 commit into
linebender:mainfrom
Quik2007:qos/compatibility-lint-allows
Open

Fix warning-denying builds on Rust 1.97#1863
Quik2007 wants to merge 1 commit into
linebender:mainfrom
Quik2007:qos/compatibility-lint-allows

Conversation

@Quik2007

@Quik2007 Quik2007 commented Aug 31, 2026

Copy link
Copy Markdown

Problem

Building Vello with Rust 1.97 and -D warnings fails. 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:

error: this lint expectation is unfulfilled
  = note: `-D unfulfilled-lint-expectations` implied by `-D warnings`

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_lifetimes while using Rust 1.89 through 1.96 may still need the same allowance.

Changes

  • Remove six #[expect(single_use_lifetimes)] attributes from vello and vello_encoding.
  • Set RUSTFLAGS=-A single-use-lifetimes in the native and Wasm MSRV jobs.
  • Add the removal condition next to RUST_MIN_VER.

Testing

I reproduced the original failure on Rust 1.97.1, then checked the revised vello and vello_encoding crates with all features and the lockfile:

Toolchain Configuration Result
Rust 1.89.0 MSRV CI allowance pass
Rust 1.89.0 -D warnings pass
Rust 1.95.0 -D warnings pass
Rust 1.96.0 -D warnings pass
Rust 1.97.1 -D warnings pass

Additional checks:

  • warning-denying Clippy for vello and vello_encoding on Rust 1.95
  • cargo test -p vello_encoding --lib --all-features --locked (31 passed)
  • cargo test -p vello --lib --all-features --locked
  • repository formatting and diff checks
  • the full cross-platform CI matrix

AI usage: This PR was prepared with assistance from an AI coding tool.

@Quik2007 Quik2007 changed the title Tolerate toolchains with fixed single-use lifetime lint Fix warning-denying builds on Rust 1.97 Aug 31, 2026
@Quik2007
Quik2007 force-pushed the qos/compatibility-lint-allows branch 3 times, most recently from d079512 to 795aff1 Compare August 31, 2026 16:38
@DJMcNab

DJMcNab commented Aug 31, 2026

Copy link
Copy Markdown
Member

I believe that the fix we've used in previous cases is to add something like -A single-use-lifetimes to our MSRV checking jobs. We would then add a comment next to the MSRV saying to remove that once our MSRV is past the stable which fixes it (i.e. once it's past 1.97?)

Then we should remove the expects entirely.

@Quik2007
Quik2007 force-pushed the qos/compatibility-lint-allows branch from 795aff1 to 38e1060 Compare September 1, 2026 06:32
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
Quik2007 force-pushed the qos/compatibility-lint-allows branch from 38e1060 to 3bcc3c6 Compare September 1, 2026 06:42
@Quik2007
Quik2007 marked this pull request as ready for review September 1, 2026 19:30
@Quik2007

Quik2007 commented Sep 1, 2026

Copy link
Copy Markdown
Author

Implemented your approach

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.

2 participants