Skip to content

Commit 3bdda1c

Browse files
author
Sasha Pourcelot
committed
Fix grammatical error in error message
1 parent 1f5568d commit 3bdda1c

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

compiler/rustc_parse/src/parser/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ impl<'a> Parser<'a> {
885885
}
886886

887887
expect_err.set_primary_message(
888-
"closure body that contain statements must be surrounded by braces",
888+
"closure bodies that contain statements must be surrounded by braces",
889889
);
890890

891891
let preceding_pipe_span = right_pipe_span;

src/test/ui/expr/malformed_closure/missing_braces_around_block.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
fn main() {
1313
let num = 5;
1414
(1..num).reduce(|a, b| {
15-
//~^ ERROR: closure body that contain statements must be surrounded by braces
15+
//~^ ERROR: closure bodies that contain statements must be surrounded by braces
1616
println!("{}", a);
1717
a * b
1818
}).unwrap();

src/test/ui/expr/malformed_closure/missing_braces_around_block.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
fn main() {
1313
let num = 5;
1414
(1..num).reduce(|a, b|
15-
//~^ ERROR: closure body that contain statements must be surrounded by braces
15+
//~^ ERROR: closure bodies that contain statements must be surrounded by braces
1616
println!("{}", a);
1717
a * b
1818
).unwrap();

src/test/ui/expr/malformed_closure/missing_braces_around_block.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: closure body that contain statements must be surrounded by braces
1+
error: closure bodies that contain statements must be surrounded by braces
22
--> $DIR/missing_braces_around_block.rs:14:26
33
|
44
LL | (1..num).reduce(|a, b|

0 commit comments

Comments
 (0)