]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #95220 - rust-lang:notriddle/ast-validation-semicolon, r=Dylan-DPC
authorbors <bors@rust-lang.org>
Wed, 23 Mar 2022 16:53:47 +0000 (16:53 +0000)
committerbors <bors@rust-lang.org>
Wed, 23 Mar 2022 16:53:47 +0000 (16:53 +0000)
diagnostics: do not suggest `fn foo({ <body> }`

Instead of suggesting that the body always replace the last character on the line, presuming it must be a semicolon, the parser should instead check what the last character is, and append the body if it is anything else.

Fixes #83104


Trivial merge