Reword suggestion message

This commit is contained in:
Esteban Küber 2024-11-16 00:22:54 +00:00
parent 629a69f3e2
commit c09c73b996
10 changed files with 23 additions and 23 deletions

View file

@ -581,7 +581,7 @@ impl<'a> Parser<'a> {
{
// These are more likely to have been meant as a block body.
e.multipart_suggestion(
"try placing this code inside a block",
"you might have meant to write this as part of a block",
vec![
(stmt_span.shrink_to_lo(), "{ ".to_string()),
(stmt_span.shrink_to_hi(), " }".to_string()),
@ -593,7 +593,7 @@ impl<'a> Parser<'a> {
(token::OpenDelim(Delimiter::Brace), _) => {}
(_, _) => {
e.multipart_suggestion(
"try placing this code inside a block",
"you might have meant to write this as part of a block",
vec![
(stmt_span.shrink_to_lo(), "{ ".to_string()),
(stmt_span.shrink_to_hi(), " }".to_string()),