Skip to content

Commit

Permalink
Auto merge of rust-lang#104889 - GuillaumeGomez:fix-impl-block-in-con…
Browse files Browse the repository at this point in the history
…st-expr, r=notriddle

Fix impl block in const expr

Fixes rust-lang#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`
  • Loading branch information
bors committed Dec 22, 2022
2 parents 1ad16cd + 4c5e78c commit 4113fc1
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 4113fc1

Please sign in to comment.