Remove redundant unsafe_ignore annotations - #98961
Draft
lukesandberg wants to merge 2 commits into
Draft
lukesandberg wants to merge 2 commits into
lukesandberg wants to merge 2 commits into
Conversation
Co-authored-by: Luke Sandberg <210140+lukesandberg@users.noreply.github.com>
Contributor
Tests PassedCommit: 97f43d6 |
lukesandberg
commented
Sep 21, 2026
lukesandberg
commented
Sep 21, 2026
lukesandberg
commented
Sep 21, 2026
lukesandberg
commented
Sep 21, 2026
lukesandberg
added this pull request to stack #98978
September 21, 2026 00:29
Co-authored-by: Luke Sandberg <210140+lukesandberg@users.noreply.github.com>
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.
What?
Remove 54 redundant
#[turbo_tasks(unsafe_ignore)]field annotations, reducing the field-annotation total from 136 to 82 (39.7%). Fields that no longer carry the exemption now participate in the generatedNonLocalValueorOperationValueassertions.This is stacked on #98953, which renames the former tracing attribute to
unsafe_ignoreand leaves it solely as a marker-trait assertion escape hatch.Why?
Most annotations predated the removal of
TraceRawVcsand were only needed to exclude fields from recursive VC tracing. Keeping those exemptions would unnecessarily bypass compile-time marker checks after tracing is gone.The remaining annotations fall into these categories:
OperationValuecontract gapThe local helper/state group is the meaningful follow-up area; unlike foreign types, those types could gain separately reviewed marker implementations in their owning crates.
How?
Every field exemption was evaluated against the existing generated marker assertions. An annotation is removed only when the field already satisfies the appropriate marker bound.
debug_ignoreremains intact where it serves an independent purpose.No new
unsafe impl, wrapper type, macro opt-out, or weakened assertion is introduced, so this change removes redundant unsafety rather than relocating or widening it.Verification
cargo check --workspace --all-targetscargo fmt --all -- --checkcargo test -p turbo-tasks-macros-testscargo test --doc -p turbo-tasks