Give def_span the same SyntaxContext as span_with_body.#102538
Merged
bors merged 1 commit intorust-lang:masterfrom Oct 2, 2022
Merged
Give def_span the same SyntaxContext as span_with_body.#102538bors merged 1 commit intorust-lang:masterfrom
def_span the same SyntaxContext as span_with_body.#102538bors merged 1 commit intorust-lang:masterfrom
Conversation
Contributor
|
r? @fee1-dead (rust-highfive has picked a reviewer for you, use r? to override) |
5b9b62b to
c321933
Compare
fee1-dead
requested changes
Oct 1, 2022
Member
fee1-dead
left a comment
There was a problem hiding this comment.
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?
Member
|
@bors r+ Marked the issue as needs-test, we could land this first |
Collaborator
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this pull request
Oct 2, 2022
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.
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this pull request
Oct 2, 2022
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.
This was referenced Oct 2, 2022
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Oct 2, 2022
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
Aaron1011
pushed a commit
to Aaron1011/rust
that referenced
this pull request
Jan 6, 2023
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.
Aaron1011
pushed a commit
to Aaron1011/rust
that referenced
this pull request
Jan 6, 2023
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#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_spanwill ensure we have the correct behaviour.