Skip to content

Preserve Error's span thread id if cloned from a different thread#1315

Merged
dtolnay merged 1 commit intomasterfrom
cloneerror
Jan 23, 2023
Merged

Preserve Error's span thread id if cloned from a different thread#1315
dtolnay merged 1 commit intomasterfrom
cloneerror

Conversation

@dtolnay
Copy link
Owner

@dtolnay dtolnay commented Jan 23, 2023

Previously if you took a syn::Error with a non-call_site span, moved it to a different thread, cloned it, moved the clone back to the original thread, and called span() on that, you'd have lost the original span.

Now the span will be preserved during clone even if the clone occurs on a thread which doesn't have access to the span.

@dtolnay dtolnay merged commit 74a66f0 into master Jan 23, 2023
@dtolnay dtolnay deleted the cloneerror branch January 23, 2023 03:03
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.

1 participant