-
Notifications
You must be signed in to change notification settings - Fork 850
Add a #[must_use] annotation to Span #3234
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
base: main
Are you sure you want to change the base?
Conversation
|
I've updated this PR to target 0.1.x, since that's the version we're on. I'm not sure what the CI failures are about - they don't seem relevant to my change but maybe I'm missing a subtle implication of my change. |
Please undo that, as the maintainers have stated in multiple other PRs that they prefer to take care of backporting themselves.
Should be gone after rebasing. |
hds
left a comment
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.
If you're still interested in submitting this PR, please rebase onto the main branch (which is equivalent to the email oldv0.1.x branch).
This process has changed recently, so sorry for the conflicting messages.
Okay. Thinking about this. I'm not sure if it's not a breaking change. Let me dwell on it a little and ask some experts. |
|
Not an expert, but for what it's worth, I don't think adding |
|
On the other hand, at least this RFC considers that potentially breaking:
|
|
Yeah, |
Motivation
I noticed we had some code at work that was creating spans with e.g.
info_span!()and not doing anything with the spans. This seems like it should be prevented.Please let me know if I'm wrong about this and there are useful use-cases for creating and not using Spans and I'll close this PR.
Solution
Add a
#[must_use]totracing::Span.