Skip to content

Commit

Permalink
Slightly reword the error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Sasha Pourcelot committed Sep 6, 2021
1 parent f91161d commit 99c46c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_parse/src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ impl<'a> Parser<'a> {
let mut first_note = MultiSpan::from(vec![initial_semicolon]);
first_note.push_span_label(
initial_semicolon,
"this `;` turns the preceding expression into a statement".to_string(),
"this `;` turns the preceding closure into a statement".to_string(),
);
first_note.push_span_label(
closure_spans.body,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ note: statement found outside of a block
--> $DIR/missing_braces_around_block.rs:16:26
|
LL | println!("{}", a);
| -----------------^ this `;` turns the preceding expression into a statement
| -----------------^ this `;` turns the preceding closure into a statement
| |
| this expression is a statement because of the trailing semicolon
note: the closure body may be incorrectly delimited
Expand Down

0 comments on commit 99c46c0

Please sign in to comment.