Skip to content
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

Remove special case for statement NodeId assignment #87779

Merged
merged 1 commit into from
Aug 6, 2021

Conversation

Aaron1011
Copy link
Member

We now let noop_flat_map_stmt assign NodeIds (via visit_id),
just as we do for other AST nodes.

@rust-highfive
Copy link
Collaborator

r? @oli-obk

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 5, 2021
@petrochenkov
Copy link
Contributor

r? @petrochenkov

@rust-highfive rust-highfive assigned petrochenkov and unassigned oli-obk Aug 5, 2021
@petrochenkov
Copy link
Contributor

r=me with one more cleanup (#87779 (comment)).

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 5, 2021
@Aaron1011
Copy link
Member Author

@bors r=petrochenkov

@bors
Copy link
Contributor

bors commented Aug 5, 2021

📌 Commit 1a7e56c has been approved by petrochenkov

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 5, 2021
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Aug 6, 2021
Remove special case for statement `NodeId` assignment

We now let `noop_flat_map_stmt` assign `NodeId`s (via `visit_id`),
just as we do for other AST nodes.
@JohnTitor
Copy link
Member

Failed in rollup: #87806 (comment)
@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 6, 2021
We now let `noop_flat_map_stmt` assign `NodeId`s (via `visit_id`),
just as we do for other AST nodes.
@Aaron1011
Copy link
Member Author

@bors r=petrochenkov

@bors
Copy link
Contributor

bors commented Aug 6, 2021

📌 Commit a35d7f2 has been approved by petrochenkov

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 6, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 6, 2021
Rollup of 7 pull requests

Successful merges:

 - rust-lang#85807 (bootstrap: Disable initial-exec TLS model on powerpc)
 - rust-lang#87761 (Fix overflow in rustc happening if the `err_count()` is reduced in a stage.)
 - rust-lang#87775 (Add hint for unresolved associated trait items if the trait has a single item)
 - rust-lang#87779 (Remove special case for statement `NodeId` assignment)
 - rust-lang#87787 (Use `C-unwind` ABI for `__rust_start_panic` in `panic_abort`)
 - rust-lang#87809 (Fix typo in the ptr documentation)
 - rust-lang#87816 (Sync rustc_codegen_cranelift)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit a4262cc into rust-lang:master Aug 6, 2021
@rustbot rustbot added this to the 1.56.0 milestone Aug 6, 2021
Aaron1011 added a commit to Aaron1011/rust that referenced this pull request Aug 12, 2021
…trochenkov"

Fixes rust-lang#87877

This change interacts badly with `noop_flat_map_stmt`,
which synthesizes multiple statements with the same `NodeId`.

I'm working on a better fix that will still allow us to
remove this special case. For now, let's revert the change
to fix the ICE.

This reverts commit a4262cc, reversing
changes made to 8ee962f.
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Aug 13, 2021
…enkov

Revert "Rollup merge of rust-lang#87779 - Aaron1011:stmt-ast-id, r=petrochenkov"

Fixes rust-lang#87877

This change interacts badly with `noop_flat_map_stmt`,
which synthesizes multiple statements with the same `NodeId`.

I'm working on a better fix that will still allow us to
remove this special case. For now, let's revert the change
to fix the ICE.

This reverts commit a4262cc, reversing
changes made to 8ee962f.
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Aug 13, 2021
…enkov

Revert "Rollup merge of rust-lang#87779 - Aaron1011:stmt-ast-id, r=petrochenkov"

Fixes rust-lang#87877

This change interacts badly with `noop_flat_map_stmt`,
which synthesizes multiple statements with the same `NodeId`.

I'm working on a better fix that will still allow us to
remove this special case. For now, let's revert the change
to fix the ICE.

This reverts commit a4262cc, reversing
changes made to 8ee962f.
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 13, 2021
…laumeGomez

Rollup of 4 pull requests

Successful merges:

 - rust-lang#87795 (Avoid ICE caused by suggestion)
 - rust-lang#87966 (Fix `command-create-pidfd` test inside unprivileged Docker containers)
 - rust-lang#87969 (Revert "Rollup merge of rust-lang#87779 - Aaron1011:stmt-ast-id, r=petrochenkov")
 - rust-lang#88005 (Add rustdoc GUI test for headers)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Sep 2, 2021
expand: Treat more macro calls as statement macro calls

This PR implements the suggestion from rust-lang#87981 (comment) and treats fn-like macro calls inside `StmtKind::Item` and `StmtKind::Semi` as statement macro calls, which is consistent with treatment of attribute invocations in the same positions and with token-based macro expansion model in general.

This also allows to remove a special case in `NodeId` assignment (previously tried in rust-lang#87779), and to use statement `NodeId`s for linting (`assign_id!`).

r? `@Aaron1011`
m-ou-se added a commit to m-ou-se/rust that referenced this pull request Sep 2, 2021
expand: Treat more macro calls as statement macro calls

This PR implements the suggestion from rust-lang#87981 (comment) and treats fn-like macro calls inside `StmtKind::Item` and `StmtKind::Semi` as statement macro calls, which is consistent with treatment of attribute invocations in the same positions and with token-based macro expansion model in general.

This also allows to remove a special case in `NodeId` assignment (previously tried in rust-lang#87779), and to use statement `NodeId`s for linting (`assign_id!`).

r? `@Aaron1011`
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 3, 2021
expand: Treat more macro calls as statement macro calls

This PR implements the suggestion from rust-lang#87981 (comment) and treats fn-like macro calls inside `StmtKind::Item` and `StmtKind::Semi` as statement macro calls, which is consistent with treatment of attribute invocations in the same positions and with token-based macro expansion model in general.

This also allows to remove a special case in `NodeId` assignment (previously tried in rust-lang#87779), and to use statement `NodeId`s for linting (`assign_id!`).

r? `@Aaron1011`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants