about summary refs log tree commit diff
path: root/compiler/rustc_ast_lowering/src/expr.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-12-22 08:37:58 +0000
committerbors <bors@rust-lang.org>2022-12-22 08:37:58 +0000
commitcce9e72c55994335f8d1dac892cca755b65c8f43 (patch)
treea4138b378921c82264e805c104fb05aa42788dbd /compiler/rustc_ast_lowering/src/expr.rs
parent75f4ee8b4427278d7a35b7025ea72e02c55ae8f1 (diff)
parenta954d6334d000225ae38f65f5f9e9c182e6764ae (diff)
downloadrust-cce9e72c55994335f8d1dac892cca755b65c8f43.tar.gz
rust-cce9e72c55994335f8d1dac892cca755b65c8f43.zip
Auto merge of #104889 - GuillaumeGomez:fix-impl-block-in-const-expr, r=notriddle
Fix impl block in const expr

Fixes #83026.

The problem was that we didn't visit block expressions. Considering how big the [walk_expr](https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_hir/intravisit.rs.html#678) function is, I decided to instead implement the `hir` visitor on the struct. It also answers the question which was in a comment for `RustdocVisitor`: we should have used a visitor instead of our ad-hoc implementation.

Adding this visitor also added some extra checks that weren't present before (check changes in `rustdoc-ui` tests).

r? `@notriddle`
Diffstat (limited to 'compiler/rustc_ast_lowering/src/expr.rs')
0 files changed, 0 insertions, 0 deletions