Skip to content

Conversation

nbdd0121
Copy link
Member

@nbdd0121 nbdd0121 commented Dec 6, 2022

Given that attributes is stored in a separate BTreeMap, it's not necessary to pass it in when constructing hir::Expr. We can just construct hir::Expr and then call self.lower_attrs later if it needs attributes.

As most desugaring code don't use attributes, this allows some code cleanup.

Given that attributes is stored in a separate BTreeMap, it's not necessary
to pass it in when constructing `hir::Expr`. We can just construct
`hir::Expr` and then call `self.lower_attrs` later if it needs attributes.

As most desugaring code don't use attributes, this allows some code cleanup.
@rustbot
Copy link
Collaborator

rustbot commented Dec 6, 2022

r? @fee1-dead

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 6, 2022
Copy link
Member

@fee1-dead fee1-dead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@fee1-dead
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Dec 7, 2022

📌 Commit c559cf6 has been approved by fee1-dead

It is now in the queue for this repository.

@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-review Status: Awaiting review from the assignee but also interested parties. labels Dec 7, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 8, 2022
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#105267 (Don't ICE in ExprUseVisitor on FRU for non-existent struct)
 - rust-lang#105343 (Simplify attribute handling in rustc_ast_lowering)
 - rust-lang#105368 (Remove more `ref` patterns from the compiler)
 - rust-lang#105400 (normalize before handling simple checks for evaluatability of `ty::Const`)
 - rust-lang#105403 (rustdoc: simplify CSS selectors for item table `.stab`)
 - rust-lang#105418 (fix: remove hack from link.rs)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 95da525 into rust-lang:master Dec 8, 2022
@rustbot rustbot added this to the 1.67.0 milestone Dec 8, 2022
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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants