-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Give def_span
the same SyntaxContext as span_with_body
.
#102538
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
Conversation
r? @fee1-dead (rust-highfive has picked a reviewer for you, use r? to override) |
5b9b62b
to
c321933
Compare
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.
Could you try adding an ui test by following how auxiliary files such as https://github.com/rust-lang/rust/blob/master/src/test/ui/proc-macro/auxiliary/span-from-proc-macro.rs work?
@bors r+ Marked the issue as needs-test, we could land this first |
Give `def_span` the same SyntaxContext as `span_with_body`. rust-lang#102217 I'm not sure how to add a test, since the erroneous span was crafted using a proc macro. The debug assertion in `def_span` will ensure we have the correct behaviour.
Give `def_span` the same SyntaxContext as `span_with_body`. rust-lang#102217 I'm not sure how to add a test, since the erroneous span was crafted using a proc macro. The debug assertion in `def_span` will ensure we have the correct behaviour.
Rollup of 5 pull requests Successful merges: - rust-lang#100451 (Do not panic when a test function returns Result::Err.) - rust-lang#102098 (Use fetch_update in sync::Weak::upgrade) - rust-lang#102538 (Give `def_span` the same SyntaxContext as `span_with_body`.) - rust-lang#102556 (Make `feature(const_btree_len)` implied by `feature(const_btree_new)`) - rust-lang#102566 (Add a known-bug test for rust-lang#102498) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Give `def_span` the same SyntaxContext as `span_with_body`. rust-lang#102217 I'm not sure how to add a test, since the erroneous span was crafted using a proc macro. The debug assertion in `def_span` will ensure we have the correct behaviour.
Rollup of 5 pull requests Successful merges: - rust-lang#100451 (Do not panic when a test function returns Result::Err.) - rust-lang#102098 (Use fetch_update in sync::Weak::upgrade) - rust-lang#102538 (Give `def_span` the same SyntaxContext as `span_with_body`.) - rust-lang#102556 (Make `feature(const_btree_len)` implied by `feature(const_btree_new)`) - rust-lang#102566 (Add a known-bug test for rust-lang#102498) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
#102217
I'm not sure how to add a test, since the erroneous span was crafted using a proc macro.
The debug assertion in
def_span
will ensure we have the correct behaviour.