Mark method receivers in builtin derives as being from the derive.#149350
Mark method receivers in builtin derives as being from the derive.#149350Jarcho wants to merge 1 commit intorust-lang:mainfrom
Conversation
|
Any test that we can add here? |
|
Clippy will eventually end up with a test that covers this, but I don't think I can easily add anything here. At least I don't know of any way to test the context of arbitrary tokens. For context this is from testing the code in Clippy which detects when a proc-macro generates tokens with a span which has the context of the macro's input, but weren't actually part of the input. |
|
I'm pretty unfamiliar with out we could add a test for this . Maybe @petrochenkov would know. At the least, maybe you can provide some concrete example of what would change here. Is the span meaningful here or is it e.g. only used for diagnostics? |
|
shrug This seems obviously simple and okay. @bors r+ |
Mark method receivers in builtin derives as being from the derive. Another small annoyance while working on clippy. This was clearly using the root context on purpose, but it also has no reason to do so. All the uses of the receiver are generated by the macros so they can just use the marked context rather than the root.
Mark method receivers in builtin derives as being from the derive. Another small annoyance while working on clippy. This was clearly using the root context on purpose, but it also has no reason to do so. All the uses of the receiver are generated by the macros so they can just use the marked context rather than the root.
Mark method receivers in builtin derives as being from the derive. Another small annoyance while working on clippy. This was clearly using the root context on purpose, but it also has no reason to do so. All the uses of the receiver are generated by the macros so they can just use the marked context rather than the root.
|
Maybe #154628 (comment)? @bors try jobs=aarch64-gnu-llvm-21-1 |
This comment has been minimized.
This comment has been minimized.
Mark method receivers in builtin derives as being from the derive. try-job: aarch64-gnu-llvm-21-1
|
💔 Test for a2ea554 failed: CI. Failed job:
|
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
@bors r- |
|
This pull request was unapproved. This PR was contained in a rollup (#154629), which was unapproved. |
Another small annoyance while working on clippy. This was clearly using the root context on purpose, but it also has no reason to do so. All the uses of the receiver are generated by the macros so they can just use the marked context rather than the root.