-
-
Notifications
You must be signed in to change notification settings - Fork 159
gc(tests): keep gc unit tests green under default-on moving scavenge (follow-up to #7019) #7020
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
proggeramlug
merged 1 commit into
PerryTS:main
from
proggeramlug:gc/moving-gc-test-fixes
Jul 29, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 36350
🌐 Web query:
Rust std::marker::PhantomData<T> Send Sync non-variant Phantom marker Send Sync false💡 Result:
In Rust,
std::marker::PhantomData<T>acts as if your type contains an actual field of typeT[1][2]. Consequently, its implementation of auto traits likeSendandSyncis derived from the requirements placed onT[1][3]. Specifically,PhantomData<T>implementsSendif and only ifT: Send, and it implementsSyncif and only ifT: Sync[1][3]. BecausePhantomDatasimply mirrors theSend/Syncstatus of its contained typeT, you can control these properties by selecting an appropriateT[2][4]: 1. To make a structSendandSync, you can usePhantomData<fn() -> T>[4][5]. Unlike*const T(which is!Sendand!Sync), function pointers are alwaysSendandSync, regardless of the types involved [6][4]. 2. To make a struct!Sendor!Sync, you can usePhantomData<T>whereTis a type that is!Sendor!Sync[7][8]. Common idiomatic examples include using*const ()(for!Send + !Sync) [4][7], or importing types from the standard library likestd::cell::Cell<()>(for!Sync) orstd::sync::MutexGuard<'static, ()>(for!Send) to explicitly opt out of those traits [7][8]. BecausePhantomDatadoes not own the data it marks, it is often used to manage variance and drop check requirements without forcing specificSendorSyncbehavior unless explicitly intended [2][4]. For example, whilePhantomData<*const T>is often used to signal that a struct conceptually owns or uses a*const T(making it!Send + !Syncby default), usingPhantomData<fn() -> T>achieves the same variance without imposing the!Send/!Syncconstraints [2][4][5].Citations:
PhantomUnSendandPhantomUnSyncrust-lang/libs-team#175Make
LegacyGcPacingGuardthread-affine.LegacyGcPacingGuardonly storesOption<bool>, so it isSend; moving it out of creating thread keeps the originating thread pinning legacy GC pacing whileDroprestores the wrong thread-local override. Add a marker such asPhantomData<Rc<()>>to make the guard!Send.🤖 Prompt for AI Agents