Skip to content

merge hir_def::hir::Expr::Unsafe into Expr::Block - #23271

Merged
ChayimFriedman2 merged 2 commits into
rust-lang:masterfrom
ada4a:push-xporswkztpmn
Sep 1, 2026
Merged

merge hir_def::hir::Expr::Unsafe into Expr::Block#23271
ChayimFriedman2 merged 2 commits into
rust-lang:masterfrom
ada4a:push-xporswkztpmn

Conversation

@ada4a

@ada4a ada4a commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

A lot of callsites handled these variants similarly, so this ended up simplifying things.

`body` is no longer a neighbouring module, but rather a child of `expr_store`
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 1, 2026

@ChayimFriedman2 ChayimFriedman2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Generally I support this, but does this increase the size of Expr?

View changes since this review

Comment thread crates/hir-def/src/expr_store/pretty.rs Outdated
Comment thread crates/hir-def/src/hir.rs
@ada4a

ada4a commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Generally I support this, but does this increase the size of Expr?

There's an assert at

const _: () = assert!(std::mem::size_of::<Expr>() == 48);

which doesn't fail, so apparently not

A lot of callsites handled these variants similarly, so this ended up
simplifying things.
@ada4a
ada4a force-pushed the push-xporswkztpmn branch from e9f052a to 36ac7e2 Compare September 1, 2026 13:19

@ChayimFriedman2 ChayimFriedman2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@ChayimFriedman2
ChayimFriedman2 added this pull request to the merge queue Sep 1, 2026
Merged via the queue into rust-lang:master with commit 70ba513 Sep 1, 2026
19 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 1, 2026
@ada4a
ada4a deleted the push-xporswkztpmn branch September 1, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants