Skip to content

Implement trace for PhantomData#768

Open
Narfinger wants to merge 1 commit into
servo:mainfrom
Narfinger:trace-enabled
Open

Implement trace for PhantomData#768
Narfinger wants to merge 1 commit into
servo:mainfrom
Narfinger:trace-enabled

Conversation

@Narfinger

Copy link
Copy Markdown
Contributor

PhantomData will be used in splitting the script crate in servo but this needs PhantomData to be traceable.
Currently the #[no_trace] part of the macro breaks a generic parameter, so

struct Foo<D> {
    #[no_trace]
    PhantomData<D>
}

does not recognize the type parameter D.

Testing: This does not need testing as phantomdata does not exist, so tracing it with an empty trace is fine.
Servo PR: Link to a companion pull request in the Servo repository. Remove this line if there is no companion PR.

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
@sagudev

sagudev commented Jun 30, 2026

Copy link
Copy Markdown
Member

Currently the #[no_trace] part of the macro breaks a generic parameter,

If you do #[no_trace = "explenation"] it should avoid doing traceable check so it should work.

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