-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
rustc_span: return an impl Iterator instead of a Vec from macro_backtrace. #68407
Conversation
cd5eaf9
to
50fc4cd
Compare
@petrochenkov Addressed your comments, does it look good now? |
r=me with the clone removed |
50fc4cd
to
43b46ac
Compare
@bors r=petrochenkov |
📌 Commit 43b46aceeb2a41fe95c4d6620e37e23c5d3dfebf has been approved by |
⌛ Testing commit 43b46aceeb2a41fe95c4d6620e37e23c5d3dfebf with merge d47dac1a0628908b7b9de1f8e70f770a1c92b7b9... |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
test: allow some flexibility in check::error_from_deep_recursion's expected diagnostic. This should unblock rust-lang/rust#68407, by loosening the expected output pattern. As per rust-lang/rust#68407 (comment), this is the change in the diagnostic: ```diff -recursion limit reached while expanding the macro `m` +recursion limit reached while expanding `m!` ``` Ideally I would use something like this regex: ``` recursion limit reached while expanding (the macro `m`|`m!`) ``` but AFAIK these tests don't support regexes.
43b46ac
to
9dec58f
Compare
@bors r=petrochenkov |
📌 Commit 9dec58fc0294d6f7ef896d78fc3dd8efb61f8831 has been approved by |
⌛ Testing commit 9dec58fc0294d6f7ef896d78fc3dd8efb61f8831 with merge db5e6d5d771b77dfeb0028e3871c9d7a5de75117... |
This comment has been minimized.
This comment has been minimized.
Some tests in clippy failed and it's a no tool breakage week. Marking as waiting on author because some regressions in rustfix tests there look legitimate. |
This comment has been minimized.
This comment has been minimized.
Don't use ExpnKind::descr to get the name of a bang macro. This is the same change as the first commit in rust-lang/rust#68407, but applied to clippy. The new code should work both before and after the changes in rust-lang/rust#68407.
Don't use ExpnKind::descr to get the name of a bang macro. This is the same change as the first commit in rust-lang/rust#68407, but applied to clippy. The new code should work both before and after the changes in rust-lang/rust#68407. changelog: none
9dec58f
to
6980f82
Compare
@bors r=petrochenkov |
📌 Commit 6980f82 has been approved by |
according to the diff, this PR also changes submodules, is this intended? |
@matthiaskrgr Yupp, see #68407 (comment) and #68407 (comment). |
rustc_span: return an impl Iterator instead of a Vec from macro_backtrace. Having `Span::macro_backtrace` produce an `impl Iterator<Item = ExpnData>` allows #67359 to use it instead of rolling its own similar functionality. The move from `MacroBacktrace` to `ExpnData` (which the first two commits are prerequisites for) both eliminates unnecessary allocations, and is strictly more flexible (exposes more information). r? @petrochenkov
☀️ Test successful - checks-azure |
📣 Toolstate changed by #68407! Tested on commit a237641. 🎉 rustc-guide on linux: test-fail → test-pass (cc @JohnTitor @amanjeev @spastorino @mark-i-m, @rust-lang/infra). |
Tested on commit rust-lang/rust@a237641. Direct link to PR: <rust-lang/rust#68407> 🎉 rustc-guide on linux: test-fail → test-pass (cc @JohnTitor @amanjeev @spastorino @mark-i-m, @rust-lang/infra).
Having
Span::macro_backtrace
produce animpl Iterator<Item = ExpnData>
allows #67359 to use it instead of rolling its own similar functionality.The move from
MacroBacktrace
toExpnData
(which the first two commits are prerequisites for) both eliminates unnecessary allocations, and is strictly more flexible (exposes more information).r? @petrochenkov