Skip to content

Commit

Permalink
Fix grammatical error in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Sasha Pourcelot committed Sep 1, 2021
1 parent 1f5568d commit 3bdda1c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 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 @@ -885,7 +885,7 @@ impl<'a> Parser<'a> {
}

expect_err.set_primary_message(
"closure body that contain statements must be surrounded by braces",
"closure bodies that contain statements must be surrounded by braces",
);

let preceding_pipe_span = right_pipe_span;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
fn main() {
let num = 5;
(1..num).reduce(|a, b| {
//~^ ERROR: closure body that contain statements must be surrounded by braces
//~^ ERROR: closure bodies that contain statements must be surrounded by braces
println!("{}", a);
a * b
}).unwrap();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
fn main() {
let num = 5;
(1..num).reduce(|a, b|
//~^ ERROR: closure body that contain statements must be surrounded by braces
//~^ ERROR: closure bodies that contain statements must be surrounded by braces
println!("{}", a);
a * b
).unwrap();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error: closure body that contain statements must be surrounded by braces
error: closure bodies that contain statements must be surrounded by braces
--> $DIR/missing_braces_around_block.rs:14:26
|
LL | (1..num).reduce(|a, b|
Expand Down

0 comments on commit 3bdda1c

Please sign in to comment.