Skip to content

HIR: explain in comment why ExprKind::If "then" is an Expr #141059

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

samueltardieu
Copy link
Contributor

One could be tempted to replace the "then" hir::Expr with kind hir::ExprKind::Block by a hir::Block. Explain why this would not be a good idea.

I've been there.

r? @compiler-errors

One could be tempted to replace the "then" `hir::Expr` with kind
`hir::ExprKind::Block` by a `hir::Block`. Explain why this would not be
a good idea.
@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 May 15, 2025
@compiler-errors
Copy link
Member

thanks!

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented May 15, 2025

📌 Commit cf878d8 has been approved by compiler-errors

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 May 15, 2025
hkBst added a commit to hkBst/rust that referenced this pull request May 16, 2025
…=compiler-errors

HIR: explain in comment why `ExprKind::If` "then" is an `Expr`

One could be tempted to replace the "then" `hir::Expr` with kind `hir::ExprKind::Block` by a `hir::Block`. Explain why this would not be a good idea.

I've been there.

r? `@compiler-errors`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 17, 2025
…=compiler-errors

HIR: explain in comment why `ExprKind::If` "then" is an `Expr`

One could be tempted to replace the "then" `hir::Expr` with kind `hir::ExprKind::Block` by a `hir::Block`. Explain why this would not be a good idea.

I've been there.

r? ``@compiler-errors``
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