tracing
tracing copied to clipboard
Attach follows_from() before constructing future
Motivation
See #2650
Solution
Moving loop that makes the attribute span follows_from()
other attribute spans before the creation of the future to remove the implicit Copy
requirement for attributes.
CC @hawkw does this look right to you? How and where can I add a testcase for this ( I am a first time contributor to this project)?
CC @TheNeikos (submitted the issue mentioned above with me)
Thanks for working on this!
CC @hawkw does this look right to you? How and where can I add a testcase for this ( I am a first time contributor to this project)?
There are tests for the #[instrument]
macro's follows_from
support in this file. I would add a test where a non-Copy
parameter is used in follows_from
--- we probably start by copying the example provided in #2650 into a test in that file, I think. Since this is a compile error rather than a runtime error, we would expect the test to not compile on the master
branch, and we would expect it to compile successfully on this branch.
Let me know if you have any more questions!
Does this look like it is going in the right direction to you?
I think we can make the Id
in NonCopyContext
an Option<Id>
, because the actual id is irrelevant for the testcase.
It seems that the only thing left here is formatting. I hope I can get this squashed tomorrow. If not, I am off for one week (see you all at Rustconf), so this has to wait for after I return home. 😂
@matthiasbeyer if you don't mind selecting "Allow changes from maintainers", I'm happy to pull the branch and run rustfmt
on my machine, and then I can merge it? Otherwise, pushing a commit to fix rustfmt tomorrow is good with me!
Squashed the changes and ensured the changes in the commits are formatted. ~~I'll also enable edits!~~ Was already enabled. :smile: :+1:
Hi! Can this be merged soon?